diff --git a/services/console/src/components/console/perf/plot/PlotHeader.tsx b/services/console/src/components/console/perf/plot/PlotHeader.tsx index 5d36ee7cb..901983abb 100644 --- a/services/console/src/components/console/perf/plot/PlotHeader.tsx +++ b/services/console/src/components/console/perf/plot/PlotHeader.tsx @@ -146,8 +146,6 @@ const MeasureSelect = (props: { index: number; handleMeasure: (index: number, slug: null | string) => void; }) => { - console.log(props.measures()); - const measure = createMemo(() => props .json_measures() diff --git a/services/console/src/components/console/perf/plot/key/PlotKey.tsx b/services/console/src/components/console/perf/plot/key/PlotKey.tsx index eddc8392e..c834fb36f 100644 --- a/services/console/src/components/console/perf/plot/key/PlotKey.tsx +++ b/services/console/src/components/console/perf/plot/key/PlotKey.tsx @@ -1,6 +1,10 @@ import * as d3 from "d3"; import { type Accessor, For, type Resource, Show, createMemo } from "solid-js"; -import type { JsonPerf } from "../../../../../types/bencher"; +import { BENCHMARK_ICON } from "../../../../../config/project/benchmarks"; +import { BRANCH_ICON } from "../../../../../config/project/branches"; +import { MEASURE_ICON } from "../../../../../config/project/measures"; +import { TESTBED_ICON } from "../../../../../config/project/testbeds"; +import type { JsonPerf, JsonPerfMetrics } from "../../../../../types/bencher"; export interface Props { key: Accessor; @@ -43,6 +47,23 @@ const ExpandedKey = (props: { handlePerfActive: (index: number) => void; togglePerfActive: () => void; }) => { + const dimensions = (resultDimension: (result: JsonPerfMetrics) => string) => + props.perfData()?.results?.reduce((set, result) => { + return set.add(resultDimension(result)); + }, new Set()); + const branches = createMemo(() => + dimensions((result) => result.branch?.name), + ); + const testbeds = createMemo(() => + dimensions((result) => result.testbed?.name), + ); + const benchmarks = createMemo(() => + dimensions((result) => result.benchmark?.name), + ); + const measures = createMemo(() => + dimensions((result) => result.measure?.name), + ); + return (
@@ -53,6 +74,48 @@ const ExpandedKey = (props: { togglePerfActive={props.togglePerfActive} />
+ 1 && + (branches()?.size === 1 || + testbeds()?.size === 1 || + benchmarks()?.size === 1 || + measures()?.size === 1) + } + > +
+
+
+
+ + + + + + + + + + + + +
+
+
+
+
{( result: { @@ -69,13 +132,41 @@ const ExpandedKey = (props: { perfActive={props.perfActive} handlePerfActive={props.handlePerfActive} /> - - - - + + + + + + + + + + + +
)}