From 4b3c6994a7f8ea2560a15c58bd68e6850fa7045e Mon Sep 17 00:00:00 2001 From: Stefan Marr Date: Sun, 16 Jul 2023 19:55:52 +0100 Subject: [PATCH 1/6] Remove trialId from measurement data, because we need to group already based on runId MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Grouping based on trialId is insufficient, since we want to support getting measurements from multiple trials, for instance, when re-executing experiments. We don’t really need the trialId for anything anymore. It’s really just a database artifact. --- src/backend/compare/db-data.ts | 3 +-- src/backend/db/db.ts | 2 +- src/backend/db/types.ts | 2 -- tests/backend/compare/db-data.test.ts | 1 - 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/backend/compare/db-data.ts b/src/backend/compare/db-data.ts index b6646b43..0c6b2490 100644 --- a/src/backend/compare/db-data.ts +++ b/src/backend/compare/db-data.ts @@ -163,7 +163,6 @@ function findOrConstructMeasurements( commitId: row.commitid, runSettings: runSetting, runId: row.runid, - trialId: row.trialid, expId: row.expid }; benchResult.measurements.push(m); @@ -185,7 +184,7 @@ function findMeasurements( mm.envId == row.envid && mm.commitId == row.commitid && mm.runId == row.runid && - mm.trialId == row.trialid && + mm.expId == row.expid && mm.criterion.name == row.criterion ) { m = mm; diff --git a/src/backend/db/db.ts b/src/backend/db/db.ts index 20dcacb5..6a6667a3 100644 --- a/src/backend/db/db.ts +++ b/src/backend/db/db.ts @@ -806,7 +806,7 @@ export abstract class Database { FROM ${measurementDataTableJoins} WHERE (commitId = $1 OR commitid = $2) AND Experiment.projectId = $3 - ORDER BY expId, runId, invocation, iteration, criterion`, + ORDER BY expId, runId, trialId, invocation, iteration, criterion`, values: [commitHash1, commitHash2, projectId] }); return result.rows; diff --git a/src/backend/db/types.ts b/src/backend/db/types.ts index 209c549b..d033e004 100644 --- a/src/backend/db/types.ts +++ b/src/backend/db/types.ts @@ -145,7 +145,6 @@ export interface Baseline extends Source { export interface MeasurementData { expid: number; runid: number; - trialid: number; commitid: string; bench: string; exe: string; @@ -197,7 +196,6 @@ export interface Measurements { envId: number; runId: number; - trialId: number; expId: number; runSettings: RunSettings; commitId: string; diff --git a/tests/backend/compare/db-data.test.ts b/tests/backend/compare/db-data.test.ts index 8b7aff42..5401ada9 100644 --- a/tests/backend/compare/db-data.test.ts +++ b/tests/backend/compare/db-data.test.ts @@ -188,7 +188,6 @@ describe('collateMeasurements()', () => { return { expid: 1, runid, - trialid: 1, commitid, bench: 'b', From cadb5c23b174eb89a1f774750c89468f6f058826 Mon Sep 17 00:00:00 2001 From: Stefan Marr Date: Sun, 16 Jul 2023 19:56:08 +0100 Subject: [PATCH 2/6] Simplify findMeasurements --- src/backend/compare/db-data.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/backend/compare/db-data.ts b/src/backend/compare/db-data.ts index 0c6b2490..e103a7af 100644 --- a/src/backend/compare/db-data.ts +++ b/src/backend/compare/db-data.ts @@ -178,7 +178,6 @@ function findMeasurements( benchResult: ProcessedResult, row: MeasurementData ): Measurements | null { - let m: Measurements | null = null; for (const mm of benchResult.measurements) { if ( mm.envId == row.envid && @@ -187,9 +186,8 @@ function findMeasurements( mm.expId == row.expid && mm.criterion.name == row.criterion ) { - m = mm; - break; + return mm; } } - return m; + return null; } From a5525f192dc07c8b5b8bc672c2261e22f5d6b788 Mon Sep 17 00:00:00 2001 From: Stefan Marr Date: Sun, 16 Jul 2023 22:10:58 +0100 Subject: [PATCH 3/6] Add testing for more details for collateMeasurements() --- tests/backend/compare/db-data.test.ts | 59 +++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/tests/backend/compare/db-data.test.ts b/tests/backend/compare/db-data.test.ts index 5401ada9..9675e4d9 100644 --- a/tests/backend/compare/db-data.test.ts +++ b/tests/backend/compare/db-data.test.ts @@ -177,6 +177,65 @@ describe('collateMeasurements()', () => { expect(m1.values[0]).toHaveLength(120); expect(m2.values[0]).toHaveLength(120); }); + + it('should have the expected measurements for all benchmarks', () => { + const numValuesSteady: string[][] = []; + numValuesSteady[55] = [ + 'BubbleSort', + 'Dispatch', + 'Fannkuch', + 'QuickSort', + 'Queens', + 'Permute', + 'Loop', + 'FieldLoop', + 'IntegerLoop', + 'WhileLoop', + 'Sum', + 'Towers' + ]; + numValuesSteady[60] = [ + 'Bounce', + 'Fibonacci', + 'Sieve', + 'Storage', + 'TreeSort' + ]; + numValuesSteady[65] = ['List', 'Recurse']; + numValuesSteady[110] = ['Mandelbrot']; + numValuesSteady[120] = ['DeltaBlue', 'Json', 'NBody', 'PageRank']; + numValuesSteady[130] = ['Richards']; + numValuesSteady[250] = ['GraphSearch']; + + for (const [exe, suites] of result) { + for (const [suite, benchmarks] of suites) { + for (const [bench, processed] of benchmarks.benchmarks) { + expect(processed.measurements).toHaveLength(2); + for (const m of processed.measurements) { + if (exe.includes('SomSom')) { + expect(m.values).toHaveLength(1); + expect(m.values[0]).toHaveLength(1); + } else if (suite.includes('startup')) { + expect(m.values).toHaveLength(5); + for (const v of m.values) { + expect(v).toHaveLength(1); + } + } else if (suite.includes('steady')) { + expect(m.values).toHaveLength(1); + expect(numValuesSteady[m.values[0].length]).toContain(bench); + } else { + expect(false).toBe({ + exe, + suite, + bench, + values: m.values + }); + } + } + } + } + } + }); }); describe('needs to distinguish different run ids', () => { From 923224ff953da4a79de03069cbcdc6dd900876b1 Mon Sep 17 00:00:00 2001 From: Stefan Marr Date: Sun, 16 Jul 2023 22:58:44 +0100 Subject: [PATCH 4/6] Fix name of getMeasurements query --- src/backend/compare/compare.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/compare/compare.ts b/src/backend/compare/compare.ts index 81e49172..70171192 100644 --- a/src/backend/compare/compare.ts +++ b/src/backend/compare/compare.ts @@ -92,7 +92,7 @@ async function getMeasurements( db: Database ): Promise { const q = { - name: 'fetchMeasurementsByProjectIdRunIdTrialId', + name: 'fetchMeasurementsByProjectIdRunIdExpId', text: `SELECT trialId, invocation, iteration, warmup, From 7b3903f7e4598ed2af8407998efa39dc19832c1b Mon Sep 17 00:00:00 2001 From: Stefan Marr Date: Sun, 16 Jul 2023 23:02:00 +0100 Subject: [PATCH 5/6] Refactor collateMeasurements to keep data of multiple trials - we now do not keep the invocation number anymore - instead, we keep different invocations from different trials in a list --- src/backend/compare/db-data.ts | 76 ++++++++++++++++++++------- src/backend/db/types.ts | 1 + tests/backend/compare/db-data.test.ts | 73 +++++++++++++++++++++++++ 3 files changed, 130 insertions(+), 20 deletions(-) diff --git a/src/backend/compare/db-data.ts b/src/backend/compare/db-data.ts index e103a7af..18696458 100644 --- a/src/backend/compare/db-data.ts +++ b/src/backend/compare/db-data.ts @@ -31,6 +31,11 @@ export function collateMeasurements( const runSettings = new Map(); const criteria = new Map(); + let lastInvocation = 0; + let lastTrialId = -1; + let lastMeasurements: Measurements | null = null; + let lastValues: number[] = []; + for (const row of data) { const c = `${row.criterion}|${row.unit}`; @@ -72,21 +77,35 @@ export function collateMeasurements( forExeBySuiteBench.set(row.suite, forSuiteByBench); } - const benchResult = findOrConstructProcessedResult(forSuiteByBench, row); - - const m: Measurements = findOrConstructMeasurements( - benchResult, - row, - criterion, - runSetting, - forSuiteByBench - ); + if ( + lastMeasurements === null || + !isSameInvocation(row, lastMeasurements, lastInvocation, lastTrialId) + ) { + const benchResult = findOrConstructProcessedResult(forSuiteByBench, row); + + const m: Measurements = findOrConstructMeasurements( + benchResult, + row, + criterion, + runSetting, + forSuiteByBench + ); - // adjust invocation and iteration to be zero-based - if (!m.values[row.invocation - 1]) { - m.values[row.invocation - 1] = []; + // We don't store the invocation number anymore + // I think this is fine, we don't really need it. + // We just need to distinguish iterations, but their ordering + // doesn't have any particular meaning. + // If we should need it for statistical analysis of inter-invocation + // effects, we may need to re-introduce it. + lastValues = []; + m.values.push(lastValues); + lastInvocation = row.invocation; + lastMeasurements = m; + lastTrialId = row.trialid; } - m.values[row.invocation - 1][row.iteration - 1] = row.value; + + // adjusted to be zero-based + lastValues[row.iteration - 1] = row.value; } return sortResultsAlphabetically(byExeSuiteBench); @@ -179,15 +198,32 @@ function findMeasurements( row: MeasurementData ): Measurements | null { for (const mm of benchResult.measurements) { - if ( - mm.envId == row.envid && - mm.commitId == row.commitid && - mm.runId == row.runid && - mm.expId == row.expid && - mm.criterion.name == row.criterion - ) { + if (isSameMeasurements(row, mm)) { return mm; } } return null; } + +function isSameMeasurements(row: MeasurementData, m: Measurements) { + return ( + m.envId == row.envid && + m.commitId == row.commitid && + m.runId == row.runid && + m.expId == row.expid && + m.criterion.name == row.criterion + ); +} + +function isSameInvocation( + row: MeasurementData, + m: Measurements, + invocation: number, + trialId: number +) { + return ( + invocation == row.invocation && + trialId == row.trialid && + isSameMeasurements(row, m) + ); +} diff --git a/src/backend/db/types.ts b/src/backend/db/types.ts index d033e004..045d26cc 100644 --- a/src/backend/db/types.ts +++ b/src/backend/db/types.ts @@ -145,6 +145,7 @@ export interface Baseline extends Source { export interface MeasurementData { expid: number; runid: number; + trialid: number; commitid: string; bench: string; exe: string; diff --git a/tests/backend/compare/db-data.test.ts b/tests/backend/compare/db-data.test.ts index 9675e4d9..e1e84d63 100644 --- a/tests/backend/compare/db-data.test.ts +++ b/tests/backend/compare/db-data.test.ts @@ -248,6 +248,7 @@ describe('collateMeasurements()', () => { expid: 1, runid, commitid, + trialid: 1, bench: 'b', exe: 'e', @@ -307,4 +308,76 @@ describe('collateMeasurements()', () => { expect(b.measurements).toHaveLength(4); }); }); + + describe('Needs to combine data from different trials but same runId', () => { + function createMeasure( + runid: number, + trialid: number, + inputsize: string, + commitid: string + ): MeasurementData { + return { + expid: 1, + runid, + commitid, + trialid, + + bench: 'b', + exe: 'e', + suite: 's', + + cmdline: 'b e s ' + inputsize, + varvalue: null, + cores: null, + inputsize, + extraargs: null, + + iteration: 1, + invocation: 1, + warmup: null, + + criterion: 'total', + unit: 'ms', + value: 1, + + envid: 1 + }; + } + + const data: MeasurementData[] = [ + createMeasure(1, 1, '1', 'a'), + createMeasure(1, 2, '1', 'a'), + createMeasure(1, 3, '1', 'a'), + createMeasure(1, 4, '1', 'b'), + createMeasure(1, 5, '1', 'b'), + createMeasure(1, 6, '1', 'b'), + createMeasure(2, 7, '2', 'a'), + createMeasure(2, 8, '2', 'b') + ]; + + const result: ResultsByExeSuiteBenchmark = collateMeasurements(data); + + it('should have 4 measurements', () => { + const suites = result.get('e'); + const bs = suites.get('s'); + const b = bs.benchmarks.get('b'); + + expect(b.measurements).toHaveLength(4); + }); + + it( + 'should have 3 invocations for the 1st and 2nd measurement,' + + ' and 1 for the rest', + () => { + const suites = result.get('e'); + const bs = suites.get('s'); + const b = bs.benchmarks.get('b'); + + expect(b.measurements[0].values).toHaveLength(3); + expect(b.measurements[1].values).toHaveLength(3); + expect(b.measurements[2].values).toHaveLength(1); + expect(b.measurements[3].values).toHaveLength(1); + } + ); + }); }); From 83a31b93297171c5f086e062d86ab118568f11a4 Mon Sep 17 00:00:00 2001 From: Stefan Marr Date: Tue, 18 Jul 2023 13:51:28 +0100 Subject: [PATCH 6/6] Remove use of expId, and instead rely on commit ids MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There can be multiple experiments for the same commit id. This is generally a little problematic, but since we designed the user interface around commit ids, I think this is something we need to handle. I would assume that multiple experiments do not introduce extra changes, and should just be treated like multiple trials from the same experiment. This is most relevant for the warmup data visualization and the profiles. Profiles should be easy enough. We will simply show a list of available profiles. For warmup data plotting, well, currently everything is going to be shown on the same plot. Not sure how well that works, but it’s a rare case, so, we can solve it of there are actually problems showing up. We also now need just the runId in the button info for profile and warmup buttons. We simply use the full commit hashes from the page header where we already have them. --- src/backend/compare/compare.ts | 87 +++++++-------- src/backend/compare/db-data.ts | 4 +- .../compare/html/stats-row-buttons-info.html | 8 +- src/backend/compare/prep-data.ts | 40 +------ src/backend/db/db.ts | 6 +- src/backend/db/has-profile.ts | 19 +--- src/backend/db/types.ts | 3 +- src/backend/perf-tracker.ts | 2 +- src/frontend/compare.ts | 104 ++++++++---------- src/frontend/plots.ts | 92 +++++++--------- src/index.ts | 7 +- src/shared/data-format.ts | 14 --- src/shared/view-types.ts | 39 +++---- tests/backend/compare/compare-view.test.ts | 20 +--- tests/backend/compare/db-data.test.ts | 73 ++++++++++++ .../compare-view/compare-versions.html | 4 +- .../compare-view/stats-row-button-info.html | 4 +- .../compare-view/stats-row-exe.html | 4 +- ...tats-row-version-one-criteria-missing.html | 4 +- .../compare-view/stats-row-version.html | 4 +- .../compare-view/stats-tbl.html | 4 +- .../stats-data-prep/compare-view-jssom.html | 52 ++++----- .../stats-data-prep/compare-view-tsom.html | 104 +++++++++--------- tests/shared/data-format.test.ts | 20 ---- 24 files changed, 328 insertions(+), 390 deletions(-) diff --git a/src/backend/compare/compare.ts b/src/backend/compare/compare.ts index 70171192..bbe56294 100644 --- a/src/backend/compare/compare.ts +++ b/src/backend/compare/compare.ts @@ -3,7 +3,7 @@ import { ParameterizedContext } from 'koa'; import { Database } from '../db/db.js'; import { completeRequest, startRequest } from '../perf-tracker.js'; import type { - WarmupData, + ProfileRow, WarmupDataForTrial, WarmupDataPerCriterion } from '../../shared/view-types.js'; @@ -23,7 +23,7 @@ export async function getProfileAsJson( ctx.body = await getProfile( Number(ctx.params.runId), - Number(ctx.params.expId), + ctx.params.commitId, db ); if (ctx.body === undefined) { @@ -36,32 +36,35 @@ export async function getProfileAsJson( async function getProfile( runId: number, - expId: number, + commitId: number, db: Database -): Promise { +): Promise { const result = await db.query({ - name: 'fetchProfileDataByRunIdExpId', + name: 'fetchProfileDataByRunIdCommitId', text: ` - SELECT substring(commitId, 1, 6) as commitid, + SELECT commitid, benchmark.name as bench, executor.name as exe, suite.name as suite, cmdline, varValue, cores, inputSize, extraArgs, invocation, numIterations, warmup, value as profile FROM ProfileData JOIN Trial ON trialId = Trial.id - JOIN Source ON source.id = sourceId + JOIN Source ON source.id = trial.sourceId JOIN Run ON runId = run.id JOIN Suite ON suiteId = suite.id JOIN Benchmark ON benchmarkId = benchmark.id JOIN Executor ON execId = executor.id - WHERE runId = $1 AND trial.expId = $2`, - values: [runId, expId] + WHERE runId = $1 AND source.commitId = $2`, + values: [runId, commitId] }); - const data = result.rows[0]; - try { - data.profile = JSON.parse(data.profile); - } catch (e) { - /* let's just leave it as a string */ + const data: ProfileRow[] = []; + for (const row of result.rows) { + try { + row.profile = JSON.parse(row.profile); + } catch (e) { + /* let's just leave it as a string */ + } + data.push(row); } return data; } @@ -75,8 +78,8 @@ export async function getMeasurementsAsJson( ctx.body = await getMeasurements( ctx.params.projectSlug, Number(ctx.params.runId), - Number(ctx.params.expId1), - Number(ctx.params.expId2), + ctx.params.baseId, + ctx.params.changeId, db ); @@ -87,14 +90,14 @@ export async function getMeasurementsAsJson( async function getMeasurements( projectSlug: string, runId: number, - expId1: number, - expId2: number, + baseCommitId: string, + changeCommitId: string, db: Database -): Promise { +): Promise { const q = { - name: 'fetchMeasurementsByProjectIdRunIdExpId', + name: 'fetchMeasurementsByProjectIdRunIdCommitId', text: `SELECT - trialId, + trialId, source.commitId as commitId, invocation, iteration, warmup, criterion.name as criterion, criterion.unit as unit, @@ -102,52 +105,37 @@ async function getMeasurements( FROM Measurement JOIN Trial ON trialId = Trial.id + JOIN Source ON source.id = trial.sourceId JOIN Experiment ON Trial.expId = Experiment.id JOIN Criterion ON criterion = criterion.id JOIN Run ON runId = run.id JOIN Project ON Project.id = Experiment.projectId WHERE Project.slug = $1 AND runId = $2 - AND (Trial.expId = $3 OR Trial.expId = $4) + AND (source.commitId = $3 OR source.commitId = $4) ORDER BY trialId, criterion, invocation, iteration;`, - values: [projectSlug, runId, expId1, expId2] + values: [projectSlug, runId, baseCommitId, changeCommitId] }; const result = await db.query(q); if (result.rows.length === 0) { return null; } - const trial1: WarmupDataForTrial = { - trialId: result.rows[0].trialid, - warmup: result.rows[0].warmup, - data: [] - }; - const trial2: WarmupDataForTrial = { - trialId: result.rows[result.rows.length - 1].trialid, - warmup: result.rows[result.rows.length - 1].warmup, - data: [] - }; - // preprocess rows, but should already have it like this in the database... - - let trialId = 0; + const dataPerTrial: WarmupDataForTrial[] = []; let currentTrial: WarmupDataForTrial | null = null; let lastCriterion = null; let critObject: WarmupDataPerCriterion | null = null; for (const r of result.rows) { - if (trialId === 0) { - trialId = r.trialid; - currentTrial = trial1; - lastCriterion = null; - } else if (trialId !== r.trialid) { - if (currentTrial === trial2) { - throw Error( - 'Unexpected trialId change. We only expect two different ones.' - ); - } - trialId = r.trialid; - currentTrial = trial2; + if (currentTrial === null || currentTrial.trialId !== r.trialid) { + currentTrial = { + trialId: r.trialid, + warmup: r.warmup, + commitId: r.commitid, + data: [] + }; lastCriterion = null; + dataPerTrial.push(currentTrial); } if (lastCriterion === null || lastCriterion !== r.criterion) { @@ -161,6 +149,7 @@ async function getMeasurements( } if (critObject) { + // this is fine, because we separate the data by trialId if (critObject.values[r.invocation - 1] === undefined) { critObject.values[r.invocation - 1] = []; } @@ -169,7 +158,7 @@ async function getMeasurements( } } - return { trial1, trial2 }; + return dataPerTrial; } export async function getTimelineDataAsJson( diff --git a/src/backend/compare/db-data.ts b/src/backend/compare/db-data.ts index 18696458..b43e12d6 100644 --- a/src/backend/compare/db-data.ts +++ b/src/backend/compare/db-data.ts @@ -181,8 +181,7 @@ function findOrConstructMeasurements( envId: row.envid, commitId: row.commitid, runSettings: runSetting, - runId: row.runid, - expId: row.expid + runId: row.runid }; benchResult.measurements.push(m); forSuiteByBench.criteria[criterion.name] = criterion; @@ -210,7 +209,6 @@ function isSameMeasurements(row: MeasurementData, m: Measurements) { m.envId == row.envid && m.commitId == row.commitid && m.runId == row.runid && - m.expId == row.expid && m.criterion.name == row.criterion ); } diff --git a/src/backend/compare/html/stats-row-buttons-info.html b/src/backend/compare/html/stats-row-buttons-info.html index fa91d7bf..a88de9da 100644 --- a/src/backend/compare/html/stats-row-buttons-info.html +++ b/src/backend/compare/html/stats-row-buttons-info.html @@ -11,14 +11,12 @@ {% } if (d.hasWarmup) { -%} +%} {% } - if (d.profileBase) { - const baseExpId = d.profileBase.expid; - const changeExpId = d.profileChange.expid; -%} + if (d.profiles) { +%} {% } %} - - + + diff --git a/tests/data/expected-results/compare-view/stats-row-button-info.html b/tests/data/expected-results/compare-view/stats-row-button-info.html index c82b5574..5a24329a 100644 --- a/tests/data/expected-results/compare-view/stats-row-button-info.html +++ b/tests/data/expected-results/compare-view/stats-row-button-info.html @@ -2,6 +2,6 @@ data-content="som/some-command with args"> - - + + \ No newline at end of file diff --git a/tests/data/expected-results/compare-view/stats-row-exe.html b/tests/data/expected-results/compare-view/stats-row-exe.html index 6925129e..ece7842d 100644 --- a/tests/data/expected-results/compare-view/stats-row-exe.html +++ b/tests/data/expected-results/compare-view/stats-row-exe.html @@ -38,7 +38,7 @@ data-content="som/some-command with args"> - - + + \ No newline at end of file diff --git a/tests/data/expected-results/compare-view/stats-row-version-one-criteria-missing.html b/tests/data/expected-results/compare-view/stats-row-version-one-criteria-missing.html index 4a031df1..a96fd02b 100644 --- a/tests/data/expected-results/compare-view/stats-row-version-one-criteria-missing.html +++ b/tests/data/expected-results/compare-view/stats-row-version-one-criteria-missing.html @@ -14,7 +14,7 @@ data-content="som/some-command with args"> - - + + \ No newline at end of file diff --git a/tests/data/expected-results/compare-view/stats-row-version.html b/tests/data/expected-results/compare-view/stats-row-version.html index 8ed6db61..8c65a01e 100644 --- a/tests/data/expected-results/compare-view/stats-row-version.html +++ b/tests/data/expected-results/compare-view/stats-row-version.html @@ -13,7 +13,7 @@ data-content="som/some-command with args"> - - + + \ No newline at end of file diff --git a/tests/data/expected-results/compare-view/stats-tbl.html b/tests/data/expected-results/compare-view/stats-tbl.html index 2f4e1c5a..213a99cd 100644 --- a/tests/data/expected-results/compare-view/stats-tbl.html +++ b/tests/data/expected-results/compare-view/stats-tbl.html @@ -29,8 +29,8 @@ data-content="som/some-command with args"> - - + + diff --git a/tests/data/expected-results/stats-data-prep/compare-view-jssom.html b/tests/data/expected-results/stats-data-prep/compare-view-jssom.html index 8edb70bf..21a822a2 100644 --- a/tests/data/expected-results/stats-data-prep/compare-view-jssom.html +++ b/tests/data/expected-results/stats-data-prep/compare-view-jssom.html @@ -160,7 +160,7 @@

macro

data-content="som.sh -cp Smalltalk:Examples/Benchmarks/Richards:Examples/Benchmarks/DeltaBlue:Examples/Benchmarks/NBody:Examples/Benchmarks/Json:Examples/Benchmarks/GraphSearch Examples/Benchmarks/BenchmarkHarness.som DeltaBlue 10 0 50"> - + @@ -175,7 +175,7 @@

macro

data-content="som.sh -cp Smalltalk:Examples/Benchmarks/Richards:Examples/Benchmarks/DeltaBlue:Examples/Benchmarks/NBody:Examples/Benchmarks/Json:Examples/Benchmarks/GraphSearch Examples/Benchmarks/BenchmarkHarness.som GraphSearch 10 0 4"> - + @@ -190,7 +190,7 @@

macro

data-content="som.sh -cp Smalltalk:Examples/Benchmarks/Richards:Examples/Benchmarks/DeltaBlue:Examples/Benchmarks/NBody:Examples/Benchmarks/Json:Examples/Benchmarks/GraphSearch Examples/Benchmarks/BenchmarkHarness.som JsonSmall 10 0 1"> - + @@ -205,7 +205,7 @@

macro

data-content="som.sh -cp Smalltalk:Examples/Benchmarks/Richards:Examples/Benchmarks/DeltaBlue:Examples/Benchmarks/NBody:Examples/Benchmarks/Json:Examples/Benchmarks/GraphSearch Examples/Benchmarks/BenchmarkHarness.som NBody 10 0 500"> - + @@ -220,7 +220,7 @@

macro

data-content="som.sh -cp Smalltalk:Examples/Benchmarks/Richards:Examples/Benchmarks/DeltaBlue:Examples/Benchmarks/NBody:Examples/Benchmarks/Json:Examples/Benchmarks/GraphSearch Examples/Benchmarks/BenchmarkHarness.som PageRank 10 0 40"> - + @@ -235,7 +235,7 @@

macro

data-content="som.sh -cp Smalltalk:Examples/Benchmarks/Richards:Examples/Benchmarks/DeltaBlue:Examples/Benchmarks/NBody:Examples/Benchmarks/Json:Examples/Benchmarks/GraphSearch Examples/Benchmarks/BenchmarkHarness.som Richards 10 0 1"> - + @@ -273,7 +273,7 @@

micro

data-content="som.sh -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som Bounce 10 0 2"> - + @@ -288,7 +288,7 @@

micro

data-content="som.sh -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som BubbleSort 10 0 3"> - + @@ -303,7 +303,7 @@

micro

data-content="som.sh -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som Dispatch 10 0 2"> - + @@ -318,7 +318,7 @@

micro

data-content="som.sh -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som Fannkuch 10 0 6"> - + @@ -333,7 +333,7 @@

micro

data-content="som.sh -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som Fibonacci 10 0 3"> - + @@ -348,7 +348,7 @@

micro

data-content="som.sh -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som FieldLoop 10 0 1"> - + @@ -363,7 +363,7 @@

micro

data-content="som.sh -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som IntegerLoop 10 0 2"> - + @@ -378,7 +378,7 @@

micro

data-content="som.sh -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som List 10 0 2"> - + @@ -393,7 +393,7 @@

micro

data-content="som.sh -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som Loop 10 0 5"> - + @@ -408,7 +408,7 @@

micro

data-content="som.sh -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som Mandelbrot 10 0 30"> - + @@ -423,7 +423,7 @@

micro

data-content="som.sh -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som Permute 10 0 3"> - + @@ -438,7 +438,7 @@

micro

data-content="som.sh -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som Queens 10 0 2"> - + @@ -453,7 +453,7 @@

micro

data-content="som.sh -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som QuickSort 10 0 1"> - + @@ -468,7 +468,7 @@

micro

data-content="som.sh -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som Recurse 10 0 3"> - + @@ -483,7 +483,7 @@

micro

data-content="som.sh -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som Sieve 10 0 4"> - + @@ -498,7 +498,7 @@

micro

data-content="som.sh -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som Storage 10 0 1"> - + @@ -513,7 +513,7 @@

micro

data-content="som.sh -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som Sum 10 0 2"> - + @@ -528,7 +528,7 @@

micro

data-content="som.sh -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som Towers 10 0 2"> - + @@ -543,7 +543,7 @@

micro

data-content="som.sh -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som TreeSort 10 0 1"> - + @@ -558,7 +558,7 @@

micro

data-content="som.sh -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som WhileLoop 10 0 10"> - + diff --git a/tests/data/expected-results/stats-data-prep/compare-view-tsom.html b/tests/data/expected-results/stats-data-prep/compare-view-tsom.html index c4798b13..bf059401 100644 --- a/tests/data/expected-results/stats-data-prep/compare-view-tsom.html +++ b/tests/data/expected-results/stats-data-prep/compare-view-tsom.html @@ -479,7 +479,7 @@

macro-steady

data-content="som -cp Smalltalk:Examples/Benchmarks/Richards:Examples/Benchmarks/DeltaBlue:Examples/Benchmarks/NBody:Examples/Benchmarks/Json:Examples/Benchmarks/GraphSearch Examples/Benchmarks/BenchmarkHarness.som DeltaBlue 120 0 10000"> - + @@ -494,7 +494,7 @@

macro-steady

data-content="som -cp Smalltalk:Examples/Benchmarks/Richards:Examples/Benchmarks/DeltaBlue:Examples/Benchmarks/NBody:Examples/Benchmarks/Json:Examples/Benchmarks/GraphSearch Examples/Benchmarks/BenchmarkHarness.som GraphSearch 250 0 25"> - + @@ -509,7 +509,7 @@

macro-steady

data-content="som -cp Smalltalk:Examples/Benchmarks/Richards:Examples/Benchmarks/DeltaBlue:Examples/Benchmarks/NBody:Examples/Benchmarks/Json:Examples/Benchmarks/GraphSearch Examples/Benchmarks/BenchmarkHarness.som Json 120 0 80"> - + @@ -524,7 +524,7 @@

macro-steady

data-content="som -cp Smalltalk:Examples/Benchmarks/Richards:Examples/Benchmarks/DeltaBlue:Examples/Benchmarks/NBody:Examples/Benchmarks/Json:Examples/Benchmarks/GraphSearch Examples/Benchmarks/BenchmarkHarness.som NBody 120 0 200000"> - + @@ -539,7 +539,7 @@

macro-steady

data-content="som -cp Smalltalk:Examples/Benchmarks/Richards:Examples/Benchmarks/DeltaBlue:Examples/Benchmarks/NBody:Examples/Benchmarks/Json:Examples/Benchmarks/GraphSearch Examples/Benchmarks/BenchmarkHarness.som PageRank 120 0 1000"> - + @@ -554,7 +554,7 @@

macro-steady

data-content="som -cp Smalltalk:Examples/Benchmarks/Richards:Examples/Benchmarks/DeltaBlue:Examples/Benchmarks/NBody:Examples/Benchmarks/Json:Examples/Benchmarks/GraphSearch Examples/Benchmarks/BenchmarkHarness.som Richards 130 0 40"> - + @@ -881,7 +881,7 @@

micro-steady

data-content="som -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som Bounce 60 0 4000"> - + @@ -896,7 +896,7 @@

micro-steady

data-content="som -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som BubbleSort 55 0 3000"> - + @@ -911,7 +911,7 @@

micro-steady

data-content="som -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som Dispatch 55 0 10000"> - + @@ -926,7 +926,7 @@

micro-steady

data-content="som -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som Fannkuch 55 0 9"> - + @@ -941,7 +941,7 @@

micro-steady

data-content="som -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som Fibonacci 60 0 1000"> - + @@ -956,7 +956,7 @@

micro-steady

data-content="som -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som FieldLoop 55 0 900"> - + @@ -971,7 +971,7 @@

micro-steady

data-content="som -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som IntegerLoop 55 0 8000"> - + @@ -986,7 +986,7 @@

micro-steady

data-content="som -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som List 65 0 1000"> - + @@ -1001,7 +1001,7 @@

micro-steady

data-content="som -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som Loop 55 0 10000"> - + @@ -1016,7 +1016,7 @@

micro-steady

data-content="som -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som Mandelbrot 110 0 1000"> - + @@ -1031,7 +1031,7 @@

micro-steady

data-content="som -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som Permute 55 0 1500"> - + @@ -1046,7 +1046,7 @@

micro-steady

data-content="som -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som Queens 55 0 1000"> - + @@ -1061,7 +1061,7 @@

micro-steady

data-content="som -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som QuickSort 55 0 2000"> - + @@ -1076,7 +1076,7 @@

micro-steady

data-content="som -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som Recurse 65 0 2000"> - + @@ -1091,7 +1091,7 @@

micro-steady

data-content="som -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som Sieve 60 0 2500"> - + @@ -1106,7 +1106,7 @@

micro-steady

data-content="som -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som Storage 60 0 1000"> - + @@ -1121,7 +1121,7 @@

micro-steady

data-content="som -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som Sum 55 0 10000"> - + @@ -1136,7 +1136,7 @@

micro-steady

data-content="som -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som Towers 55 0 1000"> - + @@ -1151,7 +1151,7 @@

micro-steady

data-content="som -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som TreeSort 60 0 1000"> - + @@ -1166,7 +1166,7 @@

micro-steady

data-content="som -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som WhileLoop 55 0 9000"> - + @@ -1311,7 +1311,7 @@

macro-steady

data-content="som -Dsom.interp=BC -cp Smalltalk:Examples/Benchmarks/Richards:Examples/Benchmarks/DeltaBlue:Examples/Benchmarks/NBody:Examples/Benchmarks/Json:Examples/Benchmarks/GraphSearch Examples/Benchmarks/BenchmarkHarness.som DeltaBlue 120 0 10000"> - + @@ -1326,7 +1326,7 @@

macro-steady

data-content="som -Dsom.interp=BC -cp Smalltalk:Examples/Benchmarks/Richards:Examples/Benchmarks/DeltaBlue:Examples/Benchmarks/NBody:Examples/Benchmarks/Json:Examples/Benchmarks/GraphSearch Examples/Benchmarks/BenchmarkHarness.som GraphSearch 250 0 25"> - + @@ -1341,7 +1341,7 @@

macro-steady

data-content="som -Dsom.interp=BC -cp Smalltalk:Examples/Benchmarks/Richards:Examples/Benchmarks/DeltaBlue:Examples/Benchmarks/NBody:Examples/Benchmarks/Json:Examples/Benchmarks/GraphSearch Examples/Benchmarks/BenchmarkHarness.som Json 120 0 80"> - + @@ -1356,7 +1356,7 @@

macro-steady

data-content="som -Dsom.interp=BC -cp Smalltalk:Examples/Benchmarks/Richards:Examples/Benchmarks/DeltaBlue:Examples/Benchmarks/NBody:Examples/Benchmarks/Json:Examples/Benchmarks/GraphSearch Examples/Benchmarks/BenchmarkHarness.som NBody 120 0 200000"> - + @@ -1371,7 +1371,7 @@

macro-steady

data-content="som -Dsom.interp=BC -cp Smalltalk:Examples/Benchmarks/Richards:Examples/Benchmarks/DeltaBlue:Examples/Benchmarks/NBody:Examples/Benchmarks/Json:Examples/Benchmarks/GraphSearch Examples/Benchmarks/BenchmarkHarness.som PageRank 120 0 1000"> - + @@ -1386,7 +1386,7 @@

macro-steady

data-content="som -Dsom.interp=BC -cp Smalltalk:Examples/Benchmarks/Richards:Examples/Benchmarks/DeltaBlue:Examples/Benchmarks/NBody:Examples/Benchmarks/Json:Examples/Benchmarks/GraphSearch Examples/Benchmarks/BenchmarkHarness.som Richards 130 0 40"> - + @@ -1727,7 +1727,7 @@

micro-steady

data-content="som -Dsom.interp=BC -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som Bounce 60 0 4000"> - + @@ -1742,7 +1742,7 @@

micro-steady

data-content="som -Dsom.interp=BC -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som BubbleSort 55 0 3000"> - + @@ -1757,7 +1757,7 @@

micro-steady

data-content="som -Dsom.interp=BC -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som Dispatch 55 0 10000"> - + @@ -1772,7 +1772,7 @@

micro-steady

data-content="som -Dsom.interp=BC -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som Fannkuch 55 0 9"> - + @@ -1787,7 +1787,7 @@

micro-steady

data-content="som -Dsom.interp=BC -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som Fibonacci 60 0 1000"> - + @@ -1802,7 +1802,7 @@

micro-steady

data-content="som -Dsom.interp=BC -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som FieldLoop 55 0 900"> - + @@ -1817,7 +1817,7 @@

micro-steady

data-content="som -Dsom.interp=BC -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som IntegerLoop 55 0 8000"> - + @@ -1832,7 +1832,7 @@

micro-steady

data-content="som -Dsom.interp=BC -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som List 65 0 1000"> - + @@ -1847,7 +1847,7 @@

micro-steady

data-content="som -Dsom.interp=BC -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som Loop 55 0 10000"> - + @@ -1862,7 +1862,7 @@

micro-steady

data-content="som -Dsom.interp=BC -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som Mandelbrot 110 0 1000"> - + @@ -1877,7 +1877,7 @@

micro-steady

data-content="som -Dsom.interp=BC -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som Permute 55 0 1500"> - + @@ -1892,7 +1892,7 @@

micro-steady

data-content="som -Dsom.interp=BC -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som Queens 55 0 1000"> - + @@ -1907,7 +1907,7 @@

micro-steady

data-content="som -Dsom.interp=BC -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som QuickSort 55 0 2000"> - + @@ -1922,7 +1922,7 @@

micro-steady

data-content="som -Dsom.interp=BC -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som Recurse 65 0 2000"> - + @@ -1937,7 +1937,7 @@

micro-steady

data-content="som -Dsom.interp=BC -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som Sieve 60 0 2500"> - + @@ -1952,7 +1952,7 @@

micro-steady

data-content="som -Dsom.interp=BC -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som Storage 60 0 1000"> - + @@ -1967,7 +1967,7 @@

micro-steady

data-content="som -Dsom.interp=BC -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som Sum 55 0 10000"> - + @@ -1982,7 +1982,7 @@

micro-steady

data-content="som -Dsom.interp=BC -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som Towers 55 0 1000"> - + @@ -1997,7 +1997,7 @@

micro-steady

data-content="som -Dsom.interp=BC -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som TreeSort 60 0 1000"> - + @@ -2012,7 +2012,7 @@

micro-steady

data-content="som -Dsom.interp=BC -cp Smalltalk:Examples/Benchmarks/LanguageFeatures Examples/Benchmarks/BenchmarkHarness.som WhileLoop 55 0 9000"> - + diff --git a/tests/shared/data-format.test.ts b/tests/shared/data-format.test.ts index fdbad48d..055a7d93 100644 --- a/tests/shared/data-format.test.ts +++ b/tests/shared/data-format.test.ts @@ -4,13 +4,11 @@ import { asHumanHz, asHumanMem, benchmarkId, - dataSeriesIds, formatEnvironment, per, r0, r2 } from '../../src/shared/data-format.js'; -import { DataSeriesVersionComparison } from '../../src/shared/view-types.js'; describe('Format Functions for Numerical Values', () => { describe('r0 - round to 0 decimal places', () => { @@ -206,21 +204,3 @@ describe('Format Functions for Numerical Values', () => { }); }); }); - -describe('dataSeriesIds()', () => { - it('should return the expected string', () => { - const ids: DataSeriesVersionComparison = { - runId: 1, - base: { - commitId: '123456', - expId: 2 - }, - change: { - commitId: '123457', - expId: 4 - } - }; - - expect(dataSeriesIds(ids, 1, 2, 4)).toBe('1,123456/2,123457/4'); - }); -});