Skip to content

Commit

Permalink
add time guard for funnel experiments
Browse files Browse the repository at this point in the history
  • Loading branch information
jurajmajerik committed Apr 16, 2024
1 parent af439b2 commit 3acb4f4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions frontend/src/scenes/experiments/ExperimentView/components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,8 @@ export function ActionBanner(): JSX.Element {
// Further collection unlikely to change the result -> recommmend cutting the losses
if (
experimentInsightType === InsightType.FUNNELS &&
funnelResultsPersonsTotal > Math.min(recommendedSampleSize, 500)
funnelResultsPersonsTotal > Math.max(recommendedSampleSize, 500) &&
dayjs().diff(experiment.start_date, 'day') > 2 // at least 2 days running
) {
return (
<LemonBanner type="warning" className="mt-4">
Expand All @@ -387,7 +388,7 @@ export function ActionBanner(): JSX.Element {
</LemonBanner>
)
}
if (experimentInsightType === InsightType.TRENDS && actualRunningTime > Math.min(recommendedRunningTime, 7)) {
if (experimentInsightType === InsightType.TRENDS && actualRunningTime > Math.max(recommendedRunningTime, 7)) {
return (
<LemonBanner type="warning" className="mt-4">
Your experiment has been running long enough, but the results are still inconclusive. Continuing the
Expand Down

0 comments on commit 3acb4f4

Please sign in to comment.