Skip to content

Commit 6cf7f5b

Browse files
authored
Merge pull request #71 from getlantern/reflog/promoted-vs-original-traffic
experiments: promoted-vs-original traffic over time
2 parents 6a60932 + cb96f14 commit 6cf7f5b

2 files changed

Lines changed: 193 additions & 88 deletions

File tree

src/api/client.ts

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -711,9 +711,9 @@ export interface ExperimentSettingsResponse {
711711
applyDelaySeconds: number;
712712
}
713713

714-
// One promoted track (an experiment's challenger) paired with its original (the
715-
// control), both measured over the same now-relative window in the experiment's
716-
// target market. Backs the promoted-vs-original scatter.
714+
// One promoted experiment: its challenger (the promoted track) paired with its
715+
// control (the original), plus the metadata the dashboard needs to chart their
716+
// target-market traffic over time. Backs the promoted-vs-original traffic cards.
717717
export interface PromotedComparisonPoint {
718718
experimentId: number;
719719
targetCountry: string;
@@ -722,10 +722,6 @@ export interface PromotedComparisonPoint {
722722
locationName: string;
723723
promotedTrackName: string;
724724
originalTrackName: string;
725-
promotedGoodput: number; // median bytes/sec
726-
originalGoodput: number; // median bytes/sec
727-
promotedSamples: number;
728-
originalSamples: number;
729725
promotedAt?: string; // decided_at (when the experiment was promoted)
730726
}
731727

@@ -734,16 +730,16 @@ export interface PromotedComparisonResponse {
734730
windowStart: string;
735731
windowEnd: string;
736732
windowHours: number;
737-
statsError?: string;
738733
}
739734

740735
export function fetchExperiments(): Promise<ExperimentsResponse> {
741736
return apiFetch("/experiments");
742737
}
743738

744-
// fetchPromotedComparison returns every promoted track vs its original over a
745-
// now-relative window (hours). Server-side single SigNoz query, so the whole
746-
// scatter loads in one round-trip.
739+
// fetchPromotedComparison lists every promoted experiment (challenger vs its
740+
// original) plus the now-relative window (hours) the dashboard charts
741+
// target-market traffic over. DB-only on the server; traffic series are fetched
742+
// client-side per market.
747743
export function fetchPromotedComparison(hours: number): Promise<PromotedComparisonResponse> {
748744
return apiFetch("/experiments/promoted-comparison", { hours: String(hours) });
749745
}

0 commit comments

Comments
 (0)