Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/guidellm/presentation/data_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def from_distribution_summary(

class BenchmarkDatum(BaseModel):
requests_per_second: float
tpot: TabularDistributionSummary
itl: TabularDistributionSummary
ttft: TabularDistributionSummary
throughput: TabularDistributionSummary
time_per_request: TabularDistributionSummary
Expand All @@ -217,7 +217,7 @@ class BenchmarkDatum(BaseModel):
def from_benchmark(cls, bm: "GenerativeBenchmark"):
return cls(
requests_per_second=bm.metrics.requests_per_second.successful.mean,
tpot=TabularDistributionSummary.from_distribution_summary(
itl=TabularDistributionSummary.from_distribution_summary(
bm.metrics.inter_token_latency_ms.successful
),
ttft=TabularDistributionSummary.from_distribution_summary(
Expand Down
26 changes: 13 additions & 13 deletions src/ui/lib/components/MetricsSummary/MetricsSummary.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ export const Component = () => {

const {
ttft: ttftSLO,
tpot: tpotSLO,
itl: itlSLO,
timePerRequest: timePerRequestSLO,
throughput: throughputSLO,
percentile,
minX,
maxX,
errors,
handleTtft,
handleTpot,
handleItl,
handleTimePerRequest,
handleThroughput,
handlePercentileChange,
Expand All @@ -72,8 +72,8 @@ export const Component = () => {
const isTtftMatch = Boolean(
ttftSLO && interpolatedMetricData.ttft.enforcedPercentileValue <= ttftSLO
);
const isTpotMatch = Boolean(
tpotSLO && interpolatedMetricData.tpot.enforcedPercentileValue <= tpotSLO
const isItlMatch = Boolean(
itlSLO && interpolatedMetricData.itl.enforcedPercentileValue <= itlSLO
);
const isTprMatch = Boolean(
timePerRequestSLO &&
Expand Down Expand Up @@ -133,12 +133,12 @@ export const Component = () => {
</FieldCell>
<FieldCell data-id="field-cell-2">
<Input
label="TPOT (ms)"
value={tpotSLO}
onChange={handleTpot}
label="ITL (ms)"
value={itlSLO}
onChange={handleItl}
fullWidth
fontColor={LineColor.Secondary}
error={errors?.tpot}
error={errors?.itl}
/>
</FieldCell>
<FieldCell data-id="field-cell-3">
Expand Down Expand Up @@ -222,17 +222,17 @@ export const Component = () => {
<MiddleColumn sx={{ paddingLeft: '0px !important' }} item xs={9}>
<GraphContainer>
<MetricLine
data={[{ id: 'tpot', data: lineDataByRps.tpot || [] }]}
threshold={tpotSLO}
data={[{ id: 'itl', data: lineDataByRps.itl || [] }]}
threshold={itlSLO}
lineColor={LineColor.Secondary}
/>
</GraphContainer>
</MiddleColumn>
<MiddleColumn item xs={3}>
<MetricValue
label="TPOT"
value={`${formatNumber(interpolatedMetricData.tpot.enforcedPercentileValue)} ms`}
match={isTpotMatch}
label="ITL"
value={`${formatNumber(interpolatedMetricData.itl.enforcedPercentileValue)} ms`}
match={isItlMatch}
valueColor={LineColor.Secondary}
/>
</MiddleColumn>
Expand Down
10 changes: 5 additions & 5 deletions src/ui/lib/components/MetricsSummary/useSummary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type Errors = { [key: string]: string | undefined };

const initErrorsState: Errors = {
ttft: undefined,
tpot: undefined,
itl: undefined,
timePerRequest: undefined,
throughput: undefined,
};
Expand Down Expand Up @@ -47,20 +47,20 @@ export const useSummary = () => {
const dispatch = useDispatch();

const { current, enforcedPercentile, tasksDefaults } = useSelector(selectSloState);
const { ttft, tpot, timePerRequest, throughput } = useSelector(
const { ttft, itl, timePerRequest, throughput } = useSelector(
selectMetricsSummaryLineData
);

const [errors, setErrors] = useState<Errors>(initErrorsState);

const ttftLimits = findMinMax(ttft || []);
const tpotLimits = findMinMax(tpot || []);
const itlLimits = findMinMax(itl || []);
const timePerRequestLimits = findMinMax(timePerRequest || []);
const throughputLimits = findMinMax(throughput || []);

const limitsByMetric = {
ttft: ttftLimits,
tpot: tpotLimits,
itl: itlLimits,
timePerRequest: timePerRequestLimits,
throughput: throughputLimits,
};
Expand Down Expand Up @@ -112,7 +112,7 @@ export const useSummary = () => {
maxX: ttftLimits.maxX,
errors,
handleTtft: handleChange('ttft'),
handleTpot: handleChange('tpot'),
handleItl: handleChange('itl'),
handleTimePerRequest: handleChange('timePerRequest'),
handleThroughput: handleChange('throughput'),
handlePercentileChange,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ export const leftColumn3 = (rpsValue: number, value: number, units: string) => (

export const Component = () => {
const { data } = useGetBenchmarksQuery();
const { ttft, tpot, timePerRequest, throughput } = useSelector(
const { ttft, itl, timePerRequest, throughput } = useSelector(
selectMetricsDetailsLineData
);
const { currentRequestRate } = useSelector(selectSloState);
const formattedRequestRate = formatNumber(currentRequestRate);
const {
ttft: ttftAtRPS,
tpot: tpotAtRPS,
itl: itlAtRPS,
timePerRequest: timePerRequestAtRPS,
throughput: throughputAtRPS,
} = useSelector(selectInterpolatedMetrics);
Expand Down Expand Up @@ -77,21 +77,21 @@ export const Component = () => {
</GraphsWrapper>
</MetricsContainer>
<MetricsContainer
header="TPOT"
header="ITL"
leftColumn={leftColumn3(
formattedRequestRate,
formatNumber(tpotAtRPS.mean),
formatNumber(itlAtRPS.mean),
'ms'
)}
rightColumn={columnContent(formattedRequestRate, tpotAtRPS.percentiles, 'ms')}
rightColumn={columnContent(formattedRequestRate, itlAtRPS.percentiles, 'ms')}
>
<GraphTitle title="TPOT vs RPS" />
<GraphTitle title="ITL vs RPS" />
<GraphsWrapper>
<DashedLine
data={tpot}
data={itl}
margins={{ left: 50, bottom: 50 }}
xLegend="request per sec"
yLegend="tpot (ms)"
yLegend="itl (ms)"
minX={minX}
/>
</GraphsWrapper>
Expand Down
20 changes: 10 additions & 10 deletions src/ui/lib/store/benchmarksWindowData.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export const benchmarksScript = `window.benchmarks = [
{
requestsPerSecond: 11.411616848282272,
tpot: {
itl: {
mean: 8.758024845683707,
median: 8.788176945277623,
mode: 7.119315011160714,
Expand Down Expand Up @@ -172,7 +172,7 @@ export const benchmarksScript = `window.benchmarks = [
},
{
requestsPerSecond: 36.289181300710815,
tpot: {
itl: {
mean: 588.0161376137819,
median: 461.7137227739607,
mode: 323.1611592429025,
Expand Down Expand Up @@ -343,7 +343,7 @@ export const benchmarksScript = `window.benchmarks = [
},
{
requestsPerSecond: 20.752070927855794,
tpot: {
itl: {
mean: 116.28360712595156,
median: 26.769569941929408,
mode: 10.624987738473076,
Expand Down Expand Up @@ -514,7 +514,7 @@ export const benchmarksScript = `window.benchmarks = [
},
{
requestsPerSecond: 26.81917480361788,
tpot: {
itl: {
mean: 299.7306064613554,
median: 372.7384294782366,
mode: 13.360295976911273,
Expand Down Expand Up @@ -685,7 +685,7 @@ export const benchmarksScript = `window.benchmarks = [
},
{
requestsPerSecond: 26.823988819498975,
tpot: {
itl: {
mean: 683.8011571339198,
median: 742.2689029148647,
mode: 317.1694278717041,
Expand Down Expand Up @@ -856,7 +856,7 @@ export const benchmarksScript = `window.benchmarks = [
},
{
requestsPerSecond: 24.50047903792646,
tpot: {
itl: {
mean: 742.9258901891964,
median: 773.0941431862967,
mode: 538.750410079956,
Expand Down Expand Up @@ -1027,7 +1027,7 @@ export const benchmarksScript = `window.benchmarks = [
},
{
requestsPerSecond: 25.617829792196602,
tpot: {
itl: {
mean: 663.3098317044122,
median: 613.7458937508719,
mode: 440.9824098859514,
Expand Down Expand Up @@ -1198,7 +1198,7 @@ export const benchmarksScript = `window.benchmarks = [
},
{
requestsPerSecond: 37.02892550982192,
tpot: {
itl: {
mean: 606.4144710877113,
median: 543.5235500335693,
mode: 331.6155501774379,
Expand Down Expand Up @@ -1369,7 +1369,7 @@ export const benchmarksScript = `window.benchmarks = [
},
{
requestsPerSecond: 37.29183354201869,
tpot: {
itl: {
mean: 603.3237551205925,
median: 528.1183038439069,
mode: 400.96027510506764,
Expand Down Expand Up @@ -1540,7 +1540,7 @@ export const benchmarksScript = `window.benchmarks = [
},
{
requestsPerSecond: 37.45318312972309,
tpot: {
itl: {
mean: 600.7204526769262,
median: 626.2100083487375,
mode: 398.7384523664202,
Expand Down
2 changes: 1 addition & 1 deletion src/ui/lib/store/mockData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export const benchmarks = [
],
bucketWidth: 0,
},
tpot: {
itl: {
statistics: {
total: 0,
mean: 0,
Expand Down
10 changes: 5 additions & 5 deletions src/ui/lib/store/slices/benchmarks/benchmarks.api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ const setDefaultSLOs = (
lastBM?.ttft,
defaultPercentile
);
const tpotAvg = getAverageValueForPercentile(
firstBM?.tpot,
lastBM?.tpot,
const itlAvg = getAverageValueForPercentile(
firstBM?.itl,
lastBM?.itl,
defaultPercentile
);
const timePerRequestAvg = getAverageValueForPercentile(
Expand All @@ -66,13 +66,13 @@ const setDefaultSLOs = (
currentRequestRate: firstBM?.requestsPerSecond,
current: {
ttft: formatNumber(ttftAvg, 0),
tpot: formatNumber(tpotAvg, 0),
itl: formatNumber(itlAvg, 0),
timePerRequest: formatNumber(timePerRequestAvg, 0),
throughput: formatNumber(throughputAvg, 0),
},
tasksDefaults: {
ttft: formatNumber(ttftAvg, 0),
tpot: formatNumber(tpotAvg, 0),
itl: formatNumber(itlAvg, 0),
timePerRequest: formatNumber(timePerRequestAvg, 0),
throughput: formatNumber(throughputAvg, 0),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ interface Percentile {

export interface BenchmarkMetrics {
ttft: Statistics;
tpot: Statistics;
itl: Statistics;
timePerRequest: Statistics;
throughput: Statistics;
}
Expand Down
12 changes: 6 additions & 6 deletions src/ui/lib/store/slices/benchmarks/benchmarks.selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ export const selectMetricsSummaryLineData = createSelector(

const lineData: { [K in keyof BenchmarkMetrics]: Point[] } = {
ttft: [],
tpot: [],
itl: [],
timePerRequest: [],
throughput: [],
};
const metrics: (keyof BenchmarkMetrics)[] = [
'ttft',
'tpot',
'itl',
'timePerRequest',
'throughput',
];
Expand Down Expand Up @@ -66,7 +66,7 @@ export const selectInterpolatedMetrics = createSelector(
};
} = {
ttft: getDefaultMetricValues(),
tpot: getDefaultMetricValues(),
itl: getDefaultMetricValues(),
timePerRequest: getDefaultMetricValues(),
throughput: getDefaultMetricValues(),
mean: getDefaultMetricValues(),
Expand All @@ -81,7 +81,7 @@ export const selectInterpolatedMetrics = createSelector(
const { enforcedPercentile, currentRequestRate } = sloState;
const metrics: (keyof BenchmarkMetrics)[] = [
'ttft',
'tpot',
'itl',
'timePerRequest',
'throughput',
];
Expand Down Expand Up @@ -137,13 +137,13 @@ export const selectMetricsDetailsLineData = createSelector(
[K in keyof BenchmarkMetrics]: { data: Point[]; id: string; solid?: boolean }[];
} = {
ttft: [],
tpot: [],
itl: [],
timePerRequest: [],
throughput: [],
};
const props: (keyof BenchmarkMetrics)[] = [
'ttft',
'tpot',
'itl',
'timePerRequest',
'throughput',
];
Expand Down
2 changes: 1 addition & 1 deletion src/ui/lib/store/slices/metrics/metrics.constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ export const initialState: MetricsState = {
currentRequestRate: 0,
timePerRequest: { valuesByRps: {} },
ttft: { valuesByRps: {} },
tpot: { valuesByRps: {} },
itl: { valuesByRps: {} },
throughput: { valuesByRps: {} },
};
2 changes: 1 addition & 1 deletion src/ui/lib/store/slices/metrics/metrics.interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export interface MetricsState {
currentRequestRate: number;
timePerRequest: SingleMetricsState;
ttft: SingleMetricsState;
tpot: SingleMetricsState;
itl: SingleMetricsState;
throughput: SingleMetricsState;
}

Expand Down
4 changes: 2 additions & 2 deletions src/ui/lib/store/slices/slo/slo.constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ export const initialState: SloState = {
current: {
timePerRequest: 0,
ttft: 0,
tpot: 0,
itl: 0,
throughput: 0,
},
tasksDefaults: {
timePerRequest: 0,
ttft: 0,
tpot: 0,
itl: 0,
throughput: 0,
},
};
Loading