Skip to content

Commit

Permalink
web: fix generated type names
Browse files Browse the repository at this point in the history
  • Loading branch information
bobheadxi committed Jun 12, 2022
1 parent be312a9 commit bb35f31
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
4 changes: 2 additions & 2 deletions web/app.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 4 additions & 7 deletions web/src/lib/series.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Run, RunSuiteBenchmark, RunSuite } from "@/generated";
import { Run, Benchmark, Suite } from "@/generated";

// copied from 'apexcharts.ApexAxisChartSeries'
type ApexAxisChartSingleSeries = {
Expand All @@ -24,10 +24,7 @@ const defaultMetrics = {
[MetricBuiltins.MEM_ALLOCSPEROP]: true,
};

export function iterateSuites(
runs: Run[],
func: (s: RunSuite, r: Run) => void
) {
export function iterateSuites(runs: Run[], func: (s: Suite, r: Run) => void) {
for (let rID = 0; rID < runs.length; rID += 1) {
const run = runs[rID];
// iterate suites in each run
Expand All @@ -39,10 +36,10 @@ export function iterateSuites(

export function iterateBenchmarks(
runs: Run[],
func: (b: RunSuiteBenchmark, s: RunSuite, r: Run) => void,
func: (b: Benchmark, s: Suite, r: Run) => void,
pkg?: RegExp
) {
iterateSuites(runs, (suite: RunSuite, run: Run) => {
iterateSuites(runs, (suite: Suite, run: Run) => {
if (pkg && !pkg.test(suite.Pkg)) return;

// iterate benchmarks
Expand Down

0 comments on commit bb35f31

Please sign in to comment.