22 lines
777 B
TypeScript
22 lines
777 B
TypeScript
import type { ExperimentSummary } from '@stock-bot/stock-config/experiments';
|
|
|
|
export function ExperimentCounts({ experiment }: { experiment: ExperimentSummary }) {
|
|
const missing =
|
|
experiment.trialCount - Object.values(experiment.counts).reduce((sum, count) => sum + count, 0);
|
|
return (
|
|
<div className="text-sm text-text-secondary space-y-1">
|
|
<p>
|
|
{experiment.trialCount} trials ·{' '}
|
|
{Object.entries(experiment.counts)
|
|
.map(([status, count]) => `${status}: ${count}`)
|
|
.join(' · ')}{' '}
|
|
· missing: {missing}
|
|
</p>
|
|
{experiment.cancelRequested && (
|
|
<p>
|
|
Cancellation requested. Running trials may still finish before acknowledging cancellation.
|
|
</p>
|
|
)}
|
|
</div>
|
|
);
|
|
}
|