Skip to content

Commit 78da381

Browse files
committed
addid
1 parent e23a56d commit 78da381

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

torchci/lib/benchmark/api_helper/compilers/precompute.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)