@rubensworks/process-sparql-benchmark-results 1.3.4 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/README.md +10 -1
  2. package/bin/psbr.js +4 -1
  3. package/bin/psbr.js.map +1 -1
  4. package/index.js +5 -1
  5. package/index.js.map +1 -1
  6. package/lib/TemplateUtils.js +23 -10
  7. package/lib/TemplateUtils.js.map +1 -1
  8. package/lib/cli/CliHelpers.js +27 -14
  9. package/lib/cli/CliHelpers.js.map +1 -1
  10. package/lib/cli/CliRunner.d.ts +1 -1
  11. package/lib/cli/CliRunner.js +5 -5
  12. package/lib/cli/CliRunner.js.map +1 -1
  13. package/lib/cli/ITaskContext.js.map +1 -1
  14. package/lib/cli/commands/CommandCsv.d.ts +1 -1
  15. package/lib/cli/commands/CommandCsv.js +7 -5
  16. package/lib/cli/commands/CommandCsv.js.map +1 -1
  17. package/lib/cli/commands/CommandStats.d.ts +1 -1
  18. package/lib/cli/commands/CommandStats.js +7 -5
  19. package/lib/cli/commands/CommandStats.js.map +1 -1
  20. package/lib/cli/commands/CommandTex.d.ts +1 -1
  21. package/lib/cli/commands/CommandTex.js +7 -5
  22. package/lib/cli/commands/CommandTex.js.map +1 -1
  23. package/lib/cli/commands/csv/CommandBsbm.d.ts +2 -2
  24. package/lib/cli/commands/csv/CommandBsbm.js +103 -85
  25. package/lib/cli/commands/csv/CommandBsbm.js.map +1 -1
  26. package/lib/cli/commands/csv/CommandGithubActionsBenchmark.d.ts +2 -2
  27. package/lib/cli/commands/csv/CommandGithubActionsBenchmark.js +149 -102
  28. package/lib/cli/commands/csv/CommandGithubActionsBenchmark.js.map +1 -1
  29. package/lib/cli/commands/csv/CommandQuery.d.ts +2 -2
  30. package/lib/cli/commands/csv/CommandQuery.js +111 -93
  31. package/lib/cli/commands/csv/CommandQuery.js.map +1 -1
  32. package/lib/cli/commands/csv/CommandSummary.d.ts +2 -2
  33. package/lib/cli/commands/csv/CommandSummary.js +230 -212
  34. package/lib/cli/commands/csv/CommandSummary.js.map +1 -1
  35. package/lib/cli/commands/csv/CommandWins.d.ts +2 -2
  36. package/lib/cli/commands/csv/CommandWins.js +134 -119
  37. package/lib/cli/commands/csv/CommandWins.js.map +1 -1
  38. package/lib/cli/commands/csv/TableSerializerCsv.d.ts +0 -1
  39. package/lib/cli/commands/csv/TableSerializerMarkdown.d.ts +0 -1
  40. package/lib/cli/commands/csv/TableSerializerMarkdown.js.map +1 -1
  41. package/lib/cli/commands/stats/CommandDocker.d.ts +2 -2
  42. package/lib/cli/commands/stats/CommandDocker.js +66 -48
  43. package/lib/cli/commands/stats/CommandDocker.js.map +1 -1
  44. package/lib/cli/commands/tex/CommandQuery.d.ts +2 -2
  45. package/lib/cli/commands/tex/CommandQuery.js +241 -210
  46. package/lib/cli/commands/tex/CommandQuery.js.map +1 -1
  47. package/lib/cli/commands/tex/CommandQueryTimes.d.ts +2 -2
  48. package/lib/cli/commands/tex/CommandQueryTimes.js +141 -123
  49. package/lib/cli/commands/tex/CommandQueryTimes.js.map +1 -1
  50. package/lib/cli/commands/tex/TexUtils.js +38 -20
  51. package/lib/cli/commands/tex/TexUtils.js.map +1 -1
  52. package/lib/correctness/CorrectnessCheckerUtils.js +2 -3
  53. package/lib/correctness/CorrectnessCheckerUtils.js.map +1 -1
  54. package/package.json +46 -49
@@ -1 +1 @@
1
- {"version":3,"file":"CommandBsbm.js","sourceRoot":"","sources":["CommandBsbm.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,gDAAwB;AACxB,mCAAmC;AACnC,8CAAiD;AAEjD,iDAA0E;AAE1E,8CAAqD;AACrD,6DAA0D;AAE7C,QAAA,OAAO,GAAG,0BAA0B,CAAC;AACrC,QAAA,IAAI,GAAG,kCAAkC,CAAC;AAChD,MAAM,OAAO,GAAG,CAAC,KAAgB,EAAa,EAAE,CACrD,KAAK;KACF,OAAO,CAAC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U,EAAE,IAAI;gBAChB,SAAS,CAAC,KAAU,EAAE,QAAgB,EAAE,QAAoD;oBAC1F,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;oBACpB,QAAQ,EAAE,CAAC;gBACb,CAAC;aACF,CAAC,CAAC,CAAC;QACR,CAAC,CAAC,CAAC;QAEH,wBAAwB;QACxB,UAAU,CAAC,KAAK,EAAE,CAAC;KACpB;AACH,CAAC,CAAC,CAAC,CAAC;AAlEO,QAAA,OAAO,WAkEd","sourcesContent":["import * as fs from 'fs';\nimport Path from 'path';\nimport { Transform } from 'stream';\nimport { SaxesParser } from '@rubensworks/saxes';\nimport type { Argv } from 'yargs';\nimport { wrapCommandHandler, wrapVisualProgress } from '../../CliHelpers';\nimport type { ITaskContext } from '../../ITaskContext';\nimport { getExperimentNames } from '../tex/TexUtils';\nimport { TableSerializerCsv } from './TableSerializerCsv';\n\nexport const command = 'bsbm <experiment-dir...>';\nexport const desc = 'Convert BSBM output files to CSV';\nexport const builder = (yargs: Argv<any>): Argv<any> =>\n yargs\n .options({\n name: {\n type: 'string',\n alias: 'n',\n describe: 'Custom output file name',\n default: 'query-times.csv',\n },\n inputName: {\n type: 'string',\n describe: 'Custom input file name per experiment',\n default: 'bsbm.xml',\n },\n });\nexport const handler = (argv: Record<string, any>): Promise<void> => wrapCommandHandler(argv,\n async(context: ITaskContext) => wrapVisualProgress('Listing data', async() => {\n // Load options\n const { experimentDirectories } = getExperimentNames(argv);\n\n // Read XML files\n for (const [ experimentId, experimentDirectory ] of experimentDirectories.entries()) {\n // Prepare output CSV file\n const os = fs.createWriteStream(Path.join(experimentDirectory, `${argv.name}`));\n const serializer = new TableSerializerCsv(os);\n serializer.writeHeader([\n 'name',\n 'id',\n 'results',\n 'time',\n ]);\n\n // Read XML file\n const xmlFile = Path.join(experimentDirectory, argv.inputName);\n await new Promise<void>((resolve, reject) => {\n const parser = new SaxesParser();\n let query: { name?: string; results?: number; time?: number } | undefined;\n let tagName: string;\n parser.on('opentag', tag => {\n if (tag.name === 'query') {\n query = { name: tag.attributes.nr };\n }\n if (query) {\n tagName = tag.name;\n }\n });\n parser.on('text', text => {\n if (query && text) {\n if (tagName === 'aqetg' && query.time === undefined) {\n query.time = Number.parseFloat(text) * 1_000;\n } else if (tagName === 'avgresults' && query.results === undefined) {\n query.results = Number.parseFloat(text);\n }\n }\n });\n parser.on('closetag', tag => {\n if (tag.name === 'query' && query) {\n serializer.writeRow([\n query.name!,\n '0',\n String(query.results),\n String(query.time),\n ]);\n }\n });\n parser.on('error', reject);\n\n fs.createReadStream(xmlFile)\n .on('end', resolve)\n .pipe(new Transform({\n objectMode: true,\n transform(chunk: any, encoding: string, callback: (error?: Error | null, data?: any) => void) {\n parser.write(chunk);\n callback();\n },\n }));\n });\n\n // Close output CSV file\n serializer.close();\n }\n }));\n"]}
1
+ {"version":3,"file":"CommandBsbm.js","sourceRoot":"","sources":["CommandBsbm.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,0BAeC;AACD,0BAmEC;AA/FD,uCAAyB;AACzB,gDAAwB;AACxB,mCAAmC;AACnC,8CAAiD;AAEjD,iDAA0E;AAE1E,8CAAqD;AACrD,6DAA0D;AAE7C,QAAA,OAAO,GAAG,0BAA0B,CAAC;AACrC,QAAA,IAAI,GAAG,kCAAkC,CAAC;AACvD,SAAgB,OAAO,CAAC,KAAgB;IACtC,OAAO,KAAK;SACT,OAAO,CAAC;QACP,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,GAAG;YACV,QAAQ,EAAE,yBAAyB;YACnC,OAAO,EAAE,iBAAiB;SAC3B;QACD,SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,uCAAuC;YACjD,OAAO,EAAE,UAAU;SACpB;KACF,CAAC,CAAC;AACP,CAAC;AACD,SAAgB,OAAO,CAAC,IAAyB;IAC/C,OAAO,IAAA,+BAAkB,EAAC,IAAI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,CAAC;IACH,CAAC,CAAC,CAAC,CAAC;AACN,CAAC","sourcesContent":["import * as fs from 'fs';\nimport Path from 'path';\nimport { Transform } from 'stream';\nimport { SaxesParser } from '@rubensworks/saxes';\nimport type { Argv } from 'yargs';\nimport { wrapCommandHandler, wrapVisualProgress } from '../../CliHelpers';\nimport type { ITaskContext } from '../../ITaskContext';\nimport { getExperimentNames } from '../tex/TexUtils';\nimport { TableSerializerCsv } from './TableSerializerCsv';\n\nexport const command = 'bsbm <experiment-dir...>';\nexport const desc = 'Convert BSBM output files to CSV';\nexport function builder(yargs: Argv<any>): Argv<any> {\n return yargs\n .options({\n name: {\n type: 'string',\n alias: 'n',\n describe: 'Custom output file name',\n default: 'query-times.csv',\n },\n inputName: {\n type: 'string',\n describe: 'Custom input file name per experiment',\n default: 'bsbm.xml',\n },\n });\n}\nexport function handler(argv: Record<string, any>): Promise<void> {\n return wrapCommandHandler(argv, async(_: ITaskContext) => wrapVisualProgress('Listing data', async() => {\n // Load options\n const { experimentDirectories } = getExperimentNames(argv);\n\n // Read XML files\n for (const experimentDirectory of experimentDirectories) {\n // Prepare output CSV file\n const os = fs.createWriteStream(Path.join(experimentDirectory, `${argv.name}`));\n const serializer = new TableSerializerCsv(os);\n serializer.writeHeader([\n 'name',\n 'id',\n 'results',\n 'time',\n ]);\n\n // Read XML file\n const xmlFile = Path.join(experimentDirectory, argv.inputName);\n await new Promise<void>((resolve, reject) => {\n const parser = new SaxesParser();\n let query: { name?: string; results?: number; time?: number } | undefined;\n let tagName: string;\n parser.on('opentag', (tag) => {\n if (tag.name === 'query') {\n query = { name: tag.attributes.nr };\n }\n if (query) {\n tagName = tag.name;\n }\n });\n parser.on('text', (text) => {\n if (query && text) {\n if (tagName === 'aqetg' && query.time === undefined) {\n query.time = Number.parseFloat(text) * 1_000;\n } else if (tagName === 'avgresults' && query.results === undefined) {\n query.results = Number.parseFloat(text);\n }\n }\n });\n parser.on('closetag', (tag) => {\n if (tag.name === 'query' && query) {\n serializer.writeRow([\n query.name!,\n '0',\n String(query.results),\n String(query.time),\n ]);\n }\n });\n parser.on('error', reject);\n\n fs.createReadStream(xmlFile)\n .on('end', resolve)\n .pipe(new Transform({\n objectMode: true,\n transform(chunk: any, encoding: string, callback: (error?: Error | null, data?: any) => void) {\n parser.write(chunk);\n callback();\n },\n }));\n });\n\n // Close output CSV file\n serializer.close();\n }\n }));\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import type { Argv } from 'yargs';
2
2
  export declare const command = "ghbench <experiment-dir...>";
3
3
  export declare const desc = "Generates a JSON file for usage in the Benchmark Github Action";
4
- export declare const builder: (yargs: Argv<any>) => Argv<any>;
5
- export declare const handler: (argv: Record<string, any>) => Promise<void>;
4
+ export declare function builder(yargs: Argv<any>): Argv<any>;
5
+ export declare function handler(argv: Record<string, any>): Promise<void>;
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -11,123 +15,166 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
11
15
  }) : function(o, v) {
12
16
  o["default"] = v;
13
17
  });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
21
35
  var __importDefault = (this && this.__importDefault) || function (mod) {
22
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
23
37
  };
24
38
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.handler = exports.builder = exports.desc = exports.command = void 0;
39
+ exports.desc = exports.command = void 0;
40
+ exports.builder = builder;
41
+ exports.handler = handler;
26
42
  const fs = __importStar(require("fs"));
27
43
  const path_1 = __importDefault(require("path"));
28
44
  const CliHelpers_1 = require("../../CliHelpers");
29
45
  const TexUtils_1 = require("../tex/TexUtils");
30
46
  exports.command = 'ghbench <experiment-dir...>';
31
47
  exports.desc = 'Generates a JSON file for usage in the Benchmark Github Action';
32
- const builder = (yargs) => yargs
33
- .options({
34
- queryRegex: {
35
- type: 'string',
36
- alias: 'q',
37
- describe: 'Regex for queries to include (before any label overrides). Examples: \'^C\', \'^[^C]\', ...',
38
- },
39
- name: {
40
- type: 'string',
41
- alias: 'n',
42
- describe: 'Custom output file name',
43
- default: 'ghbench.json',
44
- },
45
- inputName: {
46
- type: 'string',
47
- describe: 'Custom input file name per experiment',
48
- default: 'query-times.csv',
49
- },
50
- inputDelimiter: {
51
- type: 'string',
52
- describe: 'Delimiter for the input CSV file',
53
- default: ';',
54
- },
55
- overrideCombinationLabels: {
56
- type: 'string',
57
- describe: 'Comma-separated list of combination labels to use',
58
- },
59
- total: {
60
- type: 'boolean',
61
- describe: 'If total execution time across the experiment must be reported',
62
- default: false,
63
- },
64
- detailed: {
65
- type: 'boolean',
66
- describe: 'If separate execution time for each query in the experiment must be reported',
67
- default: true,
68
- },
69
- });
70
- exports.builder = builder;
71
- const handler = (argv) => CliHelpers_1.wrapCommandHandler(argv, async (context) => CliHelpers_1.wrapVisualProgress('Collecting ghbench data', async () => {
72
- // Load options
73
- const { experimentDirectories, experimentNames } = TexUtils_1.getExperimentNames(argv);
74
- const queryRegex = argv.queryRegex ? new RegExp(argv.queryRegex, 'u') : undefined;
75
- // Collect timings
76
- const ghbenchData = [];
77
- for (const [experimentId, experimentDirectory] of experimentDirectories.entries()) {
78
- const ghbenchDataRaw = {};
79
- await TexUtils_1.handleCsvFile(experimentDirectory, argv, data => {
80
- if (!queryRegex || queryRegex.test(data.name)) {
81
- const value = Number.parseInt(data.time, 10);
82
- if (!ghbenchDataRaw[data.name]) {
83
- ghbenchDataRaw[data.name] = {
84
- name: `${experimentNames[experimentId]} - ${data.name}`,
85
- unit: 'ms',
86
- values: [value],
87
- extra: {
88
- results: [data.results],
89
- error: [data.error],
90
- httpRequests: [data.httpRequests],
91
- },
92
- };
48
+ function builder(yargs) {
49
+ return yargs
50
+ .options({
51
+ queryRegex: {
52
+ type: 'string',
53
+ alias: 'q',
54
+ describe: 'Regex for queries to include (before any label overrides). ' +
55
+ 'Examples: \'^C\', \'^[^C]\', ...',
56
+ },
57
+ name: {
58
+ type: 'string',
59
+ alias: 'n',
60
+ describe: 'Custom output file name',
61
+ default: 'ghbench.json',
62
+ },
63
+ inputName: {
64
+ type: 'string',
65
+ describe: 'Custom input file name per experiment',
66
+ default: 'query-times.csv',
67
+ },
68
+ inputDelimiter: {
69
+ type: 'string',
70
+ describe: 'Delimiter for the input CSV file',
71
+ default: ';',
72
+ },
73
+ overrideCombinationLabels: {
74
+ type: 'string',
75
+ describe: 'Comma-separated list of combination labels to use',
76
+ },
77
+ total: {
78
+ type: 'boolean',
79
+ describe: 'If total execution time across the experiment must be reported',
80
+ default: false,
81
+ },
82
+ detailed: {
83
+ type: 'boolean',
84
+ describe: 'If separate execution time for each query in the experiment must be reported',
85
+ default: true,
86
+ },
87
+ failures: {
88
+ type: 'boolean',
89
+ describe: 'If the number of failed query instantiations in the experiment must be reported',
90
+ default: false,
91
+ },
92
+ });
93
+ }
94
+ function handler(argv) {
95
+ return (0, CliHelpers_1.wrapCommandHandler)(argv, async (context) => (0, CliHelpers_1.wrapVisualProgress)('Collecting ghbench data', async () => {
96
+ // Load options
97
+ const { experimentDirectories, experimentNames } = (0, TexUtils_1.getExperimentNames)(argv);
98
+ const queryRegex = argv.queryRegex ? new RegExp(argv.queryRegex, 'u') : undefined;
99
+ // Collect timings
100
+ const ghbenchData = [];
101
+ for (const [experimentId, experimentDirectory] of experimentDirectories.entries()) {
102
+ const ghbenchDataRaw = {};
103
+ await (0, TexUtils_1.handleCsvFile)(experimentDirectory, argv, (data) => {
104
+ if (!queryRegex || queryRegex.test(data.name)) {
105
+ const value = Number.parseInt(data.time, 10);
106
+ if (!ghbenchDataRaw[data.name]) {
107
+ ghbenchDataRaw[data.name] = {
108
+ name: `${experimentNames[experimentId]} - ${data.name}`,
109
+ unit: 'ms',
110
+ values: [value],
111
+ extra: {
112
+ results: [data.results],
113
+ error: [data.error],
114
+ httpRequests: [data.httpRequests],
115
+ },
116
+ };
117
+ }
118
+ else {
119
+ ghbenchDataRaw[data.name].values.push(value);
120
+ ghbenchDataRaw[data.name].extra.results.push(data.results);
121
+ ghbenchDataRaw[data.name].extra.error.push(data.error);
122
+ ghbenchDataRaw[data.name].extra.httpRequests.push(data.httpRequests);
123
+ }
124
+ }
125
+ });
126
+ // Calculate averages
127
+ let total = 0;
128
+ for (const entry of Object.values(ghbenchDataRaw)) {
129
+ const successValues = entry.values.filter((val, index) => entry.extra.error[index] !== 'true');
130
+ // Queries that failed for all instantiations have no time, so they must not be reported as 0
131
+ if (successValues.length === 0) {
132
+ continue;
93
133
  }
94
- else {
95
- ghbenchDataRaw[data.name].values.push(value);
96
- ghbenchDataRaw[data.name].extra.results.push(data.results);
97
- ghbenchDataRaw[data.name].extra.error.push(data.error);
98
- ghbenchDataRaw[data.name].extra.httpRequests.push(data.httpRequests);
134
+ const value = (0, TexUtils_1.calcMedian)(successValues);
135
+ if (!Number.isNaN(value)) {
136
+ total += value;
137
+ }
138
+ // Output detailed
139
+ if (argv.detailed) {
140
+ ghbenchData.push({
141
+ name: entry.name,
142
+ unit: entry.unit,
143
+ value,
144
+ extra: `Results: [${entry.extra.results}]; Error: [${entry.extra.error}]; HTTP Requests: [${entry.extra.httpRequests}]`,
145
+ });
99
146
  }
100
147
  }
101
- });
102
- // Calculate averages
103
- let total = 0;
104
- for (const entry of Object.values(ghbenchDataRaw)) {
105
- const value = TexUtils_1.calcMedian(entry.values.filter((val, index) => entry.extra.error[index] !== 'true')) || 0;
106
- if (!Number.isNaN(value)) {
107
- total += value;
148
+ // Output totals
149
+ if (argv.total) {
150
+ ghbenchData.push({
151
+ name: `${experimentNames[experimentId]}`,
152
+ unit: 'ms',
153
+ value: total,
154
+ });
108
155
  }
109
- // Output detailed
110
- if (argv.detailed) {
156
+ // Output failures, as failed queries have no time to report
157
+ if (argv.failures) {
158
+ const failedQueries = Object.entries(ghbenchDataRaw)
159
+ .map(([name, entry]) => ({
160
+ name,
161
+ failed: entry.extra.error.filter(error => error === 'true').length,
162
+ count: entry.extra.error.length,
163
+ }))
164
+ .filter(entry => entry.failed > 0);
111
165
  ghbenchData.push({
112
- name: entry.name,
113
- unit: entry.unit,
114
- value,
115
- extra: `Results: [${entry.extra.results}]; Error: [${entry.extra.error}]; HTTP Requests: [${entry.extra.httpRequests}]`,
166
+ name: `${experimentNames[experimentId]} - failed queries`,
167
+ unit: 'failed instantiations',
168
+ value: failedQueries.reduce((sum, entry) => sum + entry.failed, 0),
169
+ extra: failedQueries.length > 0 ?
170
+ failedQueries.map(entry => `${entry.name}: ${entry.failed}/${entry.count} failed`).join('; ') :
171
+ 'None',
116
172
  });
117
173
  }
118
174
  }
119
- // Output totals
120
- if (argv.total) {
121
- ghbenchData.push({
122
- name: `${experimentNames[experimentId]}`,
123
- unit: 'ms',
124
- value: total,
125
- });
126
- }
127
- }
128
- // Write output
129
- // eslint-disable-next-line no-sync
130
- fs.writeFileSync(path_1.default.join(context.cwd, `${argv.name}`), JSON.stringify(ghbenchData, null, ' '), 'utf8');
131
- }));
132
- exports.handler = handler;
175
+ // Write output
176
+ // eslint-disable-next-line no-sync
177
+ fs.writeFileSync(path_1.default.join(context.cwd, `${argv.name}`), JSON.stringify(ghbenchData, null, ' '), 'utf8');
178
+ }));
179
+ }
133
180
  //# sourceMappingURL=CommandGithubActionsBenchmark.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CommandGithubActionsBenchmark.js","sourceRoot":"","sources":["CommandGithubActionsBenchmark.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,gDAAwB;AAExB,iDAA0E;AAE1E,8CAIyB;AAEZ,QAAA,OAAO,GAAG,6BAA6B,CAAC;AACxC,QAAA,IAAI,GAAG,gEAAgE,CAAC;AAC9E,MAAM,OAAO,GAAG,CAAC,KAAgB,EAAa,EAAE,CACrD,KAAK;KACF,OAAO,CAAC;IACP,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,GAAG;QACV,QAAQ,EAAE,6FAA6F;KACxG;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,GAAG;QACV,QAAQ,EAAE,yBAAyB;QACnC,OAAO,EAAE,cAAc;KACxB;IACD,SAAS,EAAE;QACT,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,uCAAuC;QACjD,OAAO,EAAE,iBAAiB;KAC3B;IACD,cAAc,EAAE;QACd,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,kCAAkC;QAC5C,OAAO,EAAE,GAAG;KACb;IACD,yBAAyB,EAAE;QACzB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,mDAAmD;KAC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AAQ,EAAE;gBACjB,WAAW,CAAC,IAAI,CAAC;oBACf,IAAI,EAAE,KAAK,CAAC,IAAI;oBAChB,IAAI,EAAE,KAAK,CAAC,IAAI;oBAChB,KAAK;oBACL,KAAK,EAAE,aAAa,KAAK,CAAC,KAAK,CAAC,OAAO,cAAc,KAAK,CAAC,KAAK,CAAC,KAAK,sBAAsB,KAAK,CAAC,KAAK,CAAC,YAAY,GAAG;iBACxH,CAAC,CAAC;aACJ;SACF;QAED,gBAAgB;QAChB,IAAI,IAAI,CAAC,KAAK,EAAE;YACd,WAAW,CAAC,IAAI,CAAC;gBACf,IAAI,EAAE,GAAG,eAAe,CAAC,YAAY,CAAC,EAAE;gBACxC,IAAI,EAAE,IAAI;gBACV,KAAK,EAAE,KAAK;aACb,CAAC,CAAC;SACJ;KACF;IAED,eAAe;IACf,mCAAmC;IACnC,EAAE,CAAC,aAAa,CAAC,cAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;AAC5G,CAAC,CAAC,CAAC,CAAC;AAlEO,QAAA,OAAO,WAkEd","sourcesContent":["import * as fs from 'fs';\nimport Path from 'path';\nimport type { Argv } from 'yargs';\nimport { wrapCommandHandler, wrapVisualProgress } from '../../CliHelpers';\nimport type { ITaskContext } from '../../ITaskContext';\nimport {\n calcMedian,\n getExperimentNames,\n handleCsvFile,\n} from '../tex/TexUtils';\n\nexport const command = 'ghbench <experiment-dir...>';\nexport const desc = 'Generates a JSON file for usage in the Benchmark Github Action';\nexport const builder = (yargs: Argv<any>): Argv<any> =>\n yargs\n .options({\n queryRegex: {\n type: 'string',\n alias: 'q',\n describe: 'Regex for queries to include (before any label overrides). Examples: \\'^C\\', \\'^[^C]\\', ...',\n },\n name: {\n type: 'string',\n alias: 'n',\n describe: 'Custom output file name',\n default: 'ghbench.json',\n },\n inputName: {\n type: 'string',\n describe: 'Custom input file name per experiment',\n default: 'query-times.csv',\n },\n inputDelimiter: {\n type: 'string',\n describe: 'Delimiter for the input CSV file',\n default: ';',\n },\n overrideCombinationLabels: {\n type: 'string',\n describe: 'Comma-separated list of combination labels to use',\n },\n total: {\n type: 'boolean',\n describe: 'If total execution time across the experiment must be reported',\n default: false,\n },\n detailed: {\n type: 'boolean',\n describe: 'If separate execution time for each query in the experiment must be reported',\n default: true,\n },\n });\nexport const handler = (argv: Record<string, any>): Promise<void> => wrapCommandHandler(argv,\n async(context: ITaskContext) => wrapVisualProgress('Collecting ghbench data', async() => {\n // Load options\n const { experimentDirectories, experimentNames } = getExperimentNames(argv);\n const queryRegex = argv.queryRegex ? new RegExp(argv.queryRegex, 'u') : undefined;\n\n // Collect timings\n const ghbenchData: GhbenchData = [];\n for (const [ experimentId, experimentDirectory ] of experimentDirectories.entries()) {\n const ghbenchDataRaw: Record<string, GhbenchDataRaw> = {};\n\n await handleCsvFile(experimentDirectory, argv, data => {\n if (!queryRegex || queryRegex.test(data.name)) {\n const value = Number.parseInt(data.time, 10);\n if (!ghbenchDataRaw[data.name]) {\n ghbenchDataRaw[data.name] = {\n name: `${experimentNames[experimentId]} - ${data.name}`,\n unit: 'ms',\n values: [ value ],\n extra: {\n results: [ data.results ],\n error: [ data.error ],\n httpRequests: [ data.httpRequests ],\n },\n };\n } else {\n ghbenchDataRaw[data.name].values.push(value);\n ghbenchDataRaw[data.name].extra.results.push(data.results);\n ghbenchDataRaw[data.name].extra.error.push(data.error);\n ghbenchDataRaw[data.name].extra.httpRequests.push(data.httpRequests);\n }\n }\n });\n\n // Calculate averages\n let total = 0;\n for (const entry of Object.values(ghbenchDataRaw)) {\n const value = calcMedian(entry.values.filter((val, index) => entry.extra.error[index] !== 'true')) || 0;\n if (!Number.isNaN(value)) {\n total += value;\n }\n\n // Output detailed\n if (argv.detailed) {\n ghbenchData.push({\n name: entry.name,\n unit: entry.unit,\n value,\n extra: `Results: [${entry.extra.results}]; Error: [${entry.extra.error}]; HTTP Requests: [${entry.extra.httpRequests}]`,\n });\n }\n }\n\n // Output totals\n if (argv.total) {\n ghbenchData.push({\n name: `${experimentNames[experimentId]}`,\n unit: 'ms',\n value: total,\n });\n }\n }\n\n // Write output\n // eslint-disable-next-line no-sync\n fs.writeFileSync(Path.join(context.cwd, `${argv.name}`), JSON.stringify(ghbenchData, null, ' '), 'utf8');\n }));\n\ninterface GhbenchDataRaw {\n name: string;\n unit: string;\n values: number[];\n range?: string;\n extra: { results: number[]; error: string[]; httpRequests: number[] };\n}\n\ntype GhbenchData = {\n name: string;\n unit: string;\n value: number;\n range?: string;\n extra?: string;\n}[];\n"]}
1
+ {"version":3,"file":"CommandGithubActionsBenchmark.js","sourceRoot":"","sources":["CommandGithubActionsBenchmark.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,0BA6CC;AACD,0BA8FC;AAzJD,uCAAyB;AACzB,gDAAwB;AAExB,iDAA0E;AAE1E,8CAIyB;AAEZ,QAAA,OAAO,GAAG,6BAA6B,CAAC;AACxC,QAAA,IAAI,GAAG,gEAAgE,CAAC;AACrF,SAAgB,OAAO,CAAC,KAAgB;IACtC,OAAO,KAAK;SACT,OAAO,CAAC;QACP,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,GAAG;YACV,QAAQ,EAAE,6DAA6D;gBACrE,kCAAkC;SACrC;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,GAAG;YACV,QAAQ,EAAE,yBAAyB;YACnC,OAAO,EAAE,cAAc;SACxB;QACD,SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,uCAAuC;YACjD,OAAO,EAAE,iBAAiB;SAC3B;QACD,cAAc,EAAE;YACd,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,kCAAkC;YAC5C,OAAO,E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AK,MAAM,CAAC,CAAC,MAAM;oBAClE,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM;iBAChC,CAAC,CAAC;qBACF,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;gBACrC,WAAW,CAAC,IAAI,CAAC;oBACf,IAAI,EAAE,GAAG,eAAe,CAAC,YAAY,CAAC,mBAAmB;oBACzD,IAAI,EAAE,uBAAuB;oBAC7B,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,GAAG,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;oBAClE,KAAK,EAAE,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;wBAC/B,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,KAAK,SAAS,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;wBAC/F,MAAM;iBACT,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAED,eAAe;QACf,mCAAmC;QACnC,EAAE,CAAC,aAAa,CAAC,cAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;IAC5G,CAAC,CAAC,CACH,CAAC;AACJ,CAAC","sourcesContent":["import * as fs from 'fs';\nimport Path from 'path';\nimport type { Argv } from 'yargs';\nimport { wrapCommandHandler, wrapVisualProgress } from '../../CliHelpers';\nimport type { ITaskContext } from '../../ITaskContext';\nimport {\n calcMedian,\n getExperimentNames,\n handleCsvFile,\n} from '../tex/TexUtils';\n\nexport const command = 'ghbench <experiment-dir...>';\nexport const desc = 'Generates a JSON file for usage in the Benchmark Github Action';\nexport function builder(yargs: Argv<any>): Argv<any> {\n return yargs\n .options({\n queryRegex: {\n type: 'string',\n alias: 'q',\n describe: 'Regex for queries to include (before any label overrides). ' +\n 'Examples: \\'^C\\', \\'^[^C]\\', ...',\n },\n name: {\n type: 'string',\n alias: 'n',\n describe: 'Custom output file name',\n default: 'ghbench.json',\n },\n inputName: {\n type: 'string',\n describe: 'Custom input file name per experiment',\n default: 'query-times.csv',\n },\n inputDelimiter: {\n type: 'string',\n describe: 'Delimiter for the input CSV file',\n default: ';',\n },\n overrideCombinationLabels: {\n type: 'string',\n describe: 'Comma-separated list of combination labels to use',\n },\n total: {\n type: 'boolean',\n describe: 'If total execution time across the experiment must be reported',\n default: false,\n },\n detailed: {\n type: 'boolean',\n describe: 'If separate execution time for each query in the experiment must be reported',\n default: true,\n },\n failures: {\n type: 'boolean',\n describe: 'If the number of failed query instantiations in the experiment must be reported',\n default: false,\n },\n });\n}\nexport function handler(argv: Record<string, any>): Promise<void> {\n return wrapCommandHandler(\n argv,\n async(context: ITaskContext) => wrapVisualProgress('Collecting ghbench data', async() => {\n // Load options\n const { experimentDirectories, experimentNames } = getExperimentNames(argv);\n const queryRegex = argv.queryRegex ? new RegExp(argv.queryRegex, 'u') : undefined;\n\n // Collect timings\n const ghbenchData: GhbenchData = [];\n for (const [ experimentId, experimentDirectory ] of experimentDirectories.entries()) {\n const ghbenchDataRaw: Record<string, GhbenchDataRaw> = {};\n\n await handleCsvFile(experimentDirectory, argv, (data) => {\n if (!queryRegex || queryRegex.test(data.name)) {\n const value = Number.parseInt(data.time, 10);\n if (!ghbenchDataRaw[data.name]) {\n ghbenchDataRaw[data.name] = {\n name: `${experimentNames[experimentId]} - ${data.name}`,\n unit: 'ms',\n values: [ value ],\n extra: {\n results: [ data.results ],\n error: [ data.error ],\n httpRequests: [ data.httpRequests ],\n },\n };\n } else {\n ghbenchDataRaw[data.name].values.push(value);\n ghbenchDataRaw[data.name].extra.results.push(data.results);\n ghbenchDataRaw[data.name].extra.error.push(data.error);\n ghbenchDataRaw[data.name].extra.httpRequests.push(data.httpRequests);\n }\n }\n });\n\n // Calculate averages\n let total = 0;\n for (const entry of Object.values(ghbenchDataRaw)) {\n const successValues = entry.values.filter((val, index) => entry.extra.error[index] !== 'true');\n // Queries that failed for all instantiations have no time, so they must not be reported as 0\n if (successValues.length === 0) {\n continue;\n }\n const value = calcMedian(successValues);\n if (!Number.isNaN(value)) {\n total += value;\n }\n\n // Output detailed\n if (argv.detailed) {\n ghbenchData.push({\n name: entry.name,\n unit: entry.unit,\n value,\n extra: `Results: [${entry.extra.results}]; Error: [${entry.extra.error}]; HTTP Requests: [${entry.extra.httpRequests}]`,\n });\n }\n }\n\n // Output totals\n if (argv.total) {\n ghbenchData.push({\n name: `${experimentNames[experimentId]}`,\n unit: 'ms',\n value: total,\n });\n }\n\n // Output failures, as failed queries have no time to report\n if (argv.failures) {\n const failedQueries = Object.entries(ghbenchDataRaw)\n .map(([ name, entry ]) => ({\n name,\n failed: entry.extra.error.filter(error => error === 'true').length,\n count: entry.extra.error.length,\n }))\n .filter(entry => entry.failed > 0);\n ghbenchData.push({\n name: `${experimentNames[experimentId]} - failed queries`,\n unit: 'failed instantiations',\n value: failedQueries.reduce((sum, entry) => sum + entry.failed, 0),\n extra: failedQueries.length > 0 ?\n failedQueries.map(entry => `${entry.name}: ${entry.failed}/${entry.count} failed`).join('; ') :\n 'None',\n });\n }\n }\n\n // Write output\n // eslint-disable-next-line no-sync\n fs.writeFileSync(Path.join(context.cwd, `${argv.name}`), JSON.stringify(ghbenchData, null, ' '), 'utf8');\n }),\n );\n}\n\ninterface GhbenchDataRaw {\n name: string;\n unit: string;\n values: number[];\n range?: string;\n extra: { results: number[]; error: string[]; httpRequests: number[] };\n}\n\ntype GhbenchData = {\n name: string;\n unit: string;\n value: number;\n range?: string;\n extra?: string;\n}[];\n"]}
@@ -1,5 +1,5 @@
1
1
  import type { Argv } from 'yargs';
2
2
  export declare const command = "query <experiment-dir...>";
3
3
  export declare const desc = "List all query execution times from the given experiments";
4
- export declare const builder: (yargs: Argv<any>) => Argv<any>;
5
- export declare const handler: (argv: Record<string, any>) => Promise<void>;
4
+ export declare function builder(yargs: Argv<any>): Argv<any>;
5
+ export declare function handler(argv: Record<string, any>): Promise<void>;
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -11,21 +15,33 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
11
15
  }) : function(o, v) {
12
16
  o["default"] = v;
13
17
  });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
21
35
  var __importDefault = (this && this.__importDefault) || function (mod) {
22
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
23
37
  };
24
38
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.handler = exports.builder = exports.desc = exports.command = void 0;
39
+ exports.desc = exports.command = void 0;
40
+ exports.builder = builder;
41
+ exports.handler = handler;
26
42
  const fs = __importStar(require("fs"));
27
43
  const path_1 = __importDefault(require("path"));
28
- const csv_parse_1 = __importDefault(require("csv-parse"));
44
+ const csv_parse_1 = require("csv-parse");
29
45
  const CorrectnessCheckerUtils_1 = require("../../../correctness/CorrectnessCheckerUtils");
30
46
  const CliHelpers_1 = require("../../CliHelpers");
31
47
  const TexUtils_1 = require("../tex/TexUtils");
@@ -33,88 +49,90 @@ const TableSerializerCsv_1 = require("./TableSerializerCsv");
33
49
  const TableSerializerMarkdown_1 = require("./TableSerializerMarkdown");
34
50
  exports.command = 'query <experiment-dir...>';
35
51
  exports.desc = 'List all query execution times from the given experiments';
36
- const builder = (yargs) => yargs
37
- .options({
38
- queryRegex: {
39
- type: 'string',
40
- alias: 'q',
41
- describe: 'Regex for queries to include (before any label overrides). Examples: \'^C\', \'^[^C]\', ...',
42
- },
43
- name: {
44
- type: 'string',
45
- alias: 'n',
46
- describe: 'Custom output file name',
47
- default: 'data_all.csv',
48
- },
49
- inputName: {
50
- type: 'string',
51
- describe: 'Custom input file name per experiment',
52
- default: 'query-times.csv',
53
- },
54
- inputDelimiter: {
55
- type: 'string',
56
- describe: 'Delimiter for the input CSV file',
57
- default: ';',
58
- },
59
- overrideCombinationLabels: {
60
- type: 'string',
61
- describe: 'Comma-separated list of combination labels to use',
62
- },
63
- markdown: {
64
- type: 'boolean',
65
- describe: 'If the output should be serialized as markdown',
66
- default: false,
67
- },
68
- correctnessReference: {
69
- type: 'string',
70
- describe: 'Path to a JSON file mapping queries to expected cardinality',
71
- default: '',
72
- },
73
- });
74
- exports.builder = builder;
75
- const handler = (argv) => CliHelpers_1.wrapCommandHandler(argv, async (context) => CliHelpers_1.wrapVisualProgress('Listing data', async () => {
76
- // Load options
77
- const { experimentDirectories, experimentNames } = TexUtils_1.getExperimentNames(argv);
78
- const queryRegex = argv.queryRegex ? new RegExp(argv.queryRegex, 'u') : undefined;
79
- const correctnessReference = argv.correctnessReference ?
80
- CorrectnessCheckerUtils_1.constructCorrectnessChecker(argv.correctnessReference) :
81
- undefined;
82
- // Prepare output CSV file
83
- const os = fs.createWriteStream(path_1.default.join(context.cwd, `${argv.name}`));
84
- const serializer = argv.markdown ? new TableSerializerMarkdown_1.TableSerializerMarkdown(os) : new TableSerializerCsv_1.TableSerializerCsv(os);
85
- serializer.writeHeader([
86
- 'experiment',
87
- 'time',
88
- 'requests',
89
- 'results',
90
- ...correctnessReference ? ['correctness'] : [],
91
- ]);
92
- // Read CSV files
93
- for (const [experimentId, experimentDirectory] of experimentDirectories.entries()) {
94
- // Read CSV file
95
- const csvFile = path_1.default.join(experimentDirectory, argv.inputName);
96
- await new Promise((resolve, reject) => {
97
- const parser = csv_parse_1.default({ delimiter: argv.inputDelimiter, columns: true });
98
- parser.on('data', data => {
99
- if (!queryRegex || queryRegex.test(data.name)) {
100
- serializer.writeRow([
101
- experimentNames[experimentId],
102
- data.time,
103
- data.httpRequests || '0',
104
- data.results,
105
- ...correctnessReference ?
106
- [correctnessReference.getCorrectness(experimentId, data.name, Number.parseInt(data.results, 10))] :
107
- [],
108
- ]);
109
- }
52
+ function builder(yargs) {
53
+ return yargs
54
+ .options({
55
+ queryRegex: {
56
+ type: 'string',
57
+ alias: 'q',
58
+ describe: 'Regex for queries to include (before any label overrides). Examples: \'^C\', \'^[^C]\', ...',
59
+ },
60
+ name: {
61
+ type: 'string',
62
+ alias: 'n',
63
+ describe: 'Custom output file name',
64
+ default: 'data_all.csv',
65
+ },
66
+ inputName: {
67
+ type: 'string',
68
+ describe: 'Custom input file name per experiment',
69
+ default: 'query-times.csv',
70
+ },
71
+ inputDelimiter: {
72
+ type: 'string',
73
+ describe: 'Delimiter for the input CSV file',
74
+ default: ';',
75
+ },
76
+ overrideCombinationLabels: {
77
+ type: 'string',
78
+ describe: 'Comma-separated list of combination labels to use',
79
+ },
80
+ markdown: {
81
+ type: 'boolean',
82
+ describe: 'If the output should be serialized as markdown',
83
+ default: false,
84
+ },
85
+ correctnessReference: {
86
+ type: 'string',
87
+ describe: 'Path to a JSON file mapping queries to expected cardinality',
88
+ default: '',
89
+ },
90
+ });
91
+ }
92
+ function handler(argv) {
93
+ return (0, CliHelpers_1.wrapCommandHandler)(argv, async (context) => (0, CliHelpers_1.wrapVisualProgress)('Listing data', async () => {
94
+ // Load options
95
+ const { experimentDirectories, experimentNames } = (0, TexUtils_1.getExperimentNames)(argv);
96
+ const queryRegex = argv.queryRegex ? new RegExp(argv.queryRegex, 'u') : undefined;
97
+ const correctnessReference = argv.correctnessReference ?
98
+ (0, CorrectnessCheckerUtils_1.constructCorrectnessChecker)(argv.correctnessReference) :
99
+ undefined;
100
+ // Prepare output CSV file
101
+ const os = fs.createWriteStream(path_1.default.join(context.cwd, `${argv.name}`));
102
+ const serializer = argv.markdown ? new TableSerializerMarkdown_1.TableSerializerMarkdown(os) : new TableSerializerCsv_1.TableSerializerCsv(os);
103
+ serializer.writeHeader([
104
+ 'experiment',
105
+ 'time',
106
+ 'requests',
107
+ 'results',
108
+ ...correctnessReference ? ['correctness'] : [],
109
+ ]);
110
+ // Read CSV files
111
+ for (const [experimentId, experimentDirectory] of experimentDirectories.entries()) {
112
+ // Read CSV file
113
+ const csvFile = path_1.default.join(experimentDirectory, argv.inputName);
114
+ await new Promise((resolve, reject) => {
115
+ const parser = (0, csv_parse_1.parse)({ delimiter: argv.inputDelimiter, columns: true });
116
+ parser.on('data', (data) => {
117
+ if (!queryRegex || queryRegex.test(data.name)) {
118
+ serializer.writeRow([
119
+ experimentNames[experimentId],
120
+ data.time,
121
+ data.httpRequests || '0',
122
+ data.results,
123
+ ...correctnessReference ?
124
+ [correctnessReference.getCorrectness(experimentId, data.name, Number.parseInt(data.results, 10))] :
125
+ [],
126
+ ]);
127
+ }
128
+ });
129
+ parser.on('error', reject);
130
+ parser.on('end', resolve);
131
+ fs.createReadStream(csvFile).pipe(parser);
110
132
  });
111
- parser.on('error', reject);
112
- parser.on('end', resolve);
113
- fs.createReadStream(csvFile).pipe(parser);
114
- });
115
- }
116
- // Close output CSV file
117
- serializer.close();
118
- }));
119
- exports.handler = handler;
133
+ }
134
+ // Close output CSV file
135
+ serializer.close();
136
+ }));
137
+ }
120
138
  //# sourceMappingURL=CommandQuery.js.map