File tree Expand file tree Collapse file tree
torchci/lib/benchmark/api_helper/compilers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,14 +15,26 @@ export async function getCompilerBenchmarkData(inputparams: any) {
1515 const start = Date . now ( ) ;
1616 const rows = await queryClickhouseSaved ( BENCNMARK_TABLE_NAME , inputparams ) ;
1717 const end = Date . now ( ) ;
18+ console . log ( "time to get data" , end - start ) ;
19+
20+ if ( rows . length === 0 ) {
21+ const response : BenchmarkTimeSeriesResponse = {
22+ time_series : [ ] ,
23+ time_range : {
24+ start : "" ,
25+ end : "" ,
26+ } ,
27+ } ;
28+ return response ;
29+ }
30+
1831
1932 // TODO(elainewy): add logics to handle the case to return raw data
2033 const benchmark_time_series_response = toPrecomputeCompiler (
2134 rows ,
2235 inputparams ,
2336 "time_series"
2437 ) ;
25- console . log ( "time to get data" , end - start ) ;
2638 return benchmark_time_series_response ;
2739}
2840
You can’t perform that action at this time.
0 commit comments