File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed
ui/lib/store/slices/benchmarks Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 2727 StatusDistributionSummary ,
2828)
2929from guidellm .presentation import UIDataBuilder
30+ from guidellm .presentation .injector import create_report
3031from guidellm .scheduler import strategy_display_str
3132from guidellm .utils import Colors , split_text_list_by_length
32- from guidellm .utils .injector import create_report
3333
3434__all__ = [
3535 "GenerativeBenchmarksConsole" ,
Original file line number Diff line number Diff line change @@ -59,11 +59,6 @@ const getDefaultMetricValues = () => ({
5959export const selectInterpolatedMetrics = createSelector (
6060 [ selectBenchmarks , selectSloState ] ,
6161 ( benchmarks , sloState ) => {
62- const sortedByRPS = benchmarks
63- ?. slice ( )
64- ?. sort ( ( bm1 , bm2 ) => ( bm1 . requestsPerSecond > bm2 . requestsPerSecond ? 1 : - 1 ) ) ;
65- const requestRates = sortedByRPS ?. map ( ( bm ) => bm . requestsPerSecond ) || [ ] ;
66- const { enforcedPercentile, currentRequestRate } = sloState ;
6762 const metricData : {
6863 [ K in keyof BenchmarkMetrics | 'mean' ] : {
6964 enforcedPercentileValue : number ;
@@ -77,6 +72,14 @@ export const selectInterpolatedMetrics = createSelector(
7772 throughput : getDefaultMetricValues ( ) ,
7873 mean : getDefaultMetricValues ( ) ,
7974 } ;
75+ if ( ( benchmarks ?. length || 0 ) < 2 ) {
76+ return metricData ;
77+ }
78+ const sortedByRPS = benchmarks
79+ ?. slice ( )
80+ ?. sort ( ( bm1 , bm2 ) => ( bm1 . requestsPerSecond > bm2 . requestsPerSecond ? 1 : - 1 ) ) ;
81+ const requestRates = sortedByRPS ?. map ( ( bm ) => bm . requestsPerSecond ) || [ ] ;
82+ const { enforcedPercentile, currentRequestRate } = sloState ;
8083 const metrics : ( keyof BenchmarkMetrics ) [ ] = [
8184 'ttft' ,
8285 'tpot' ,
You can’t perform that action at this time.
0 commit comments