@eagleoutice/flowr 2.13.13 → 2.13.15
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.
- package/README.md +31 -28
- package/abstract-interpretation/data-frame/resolve-args.js +11 -12
- package/benchmark/calibration.d.ts +18 -0
- package/benchmark/calibration.js +63 -0
- package/benchmark/slicer.d.ts +19 -0
- package/benchmark/slicer.js +84 -1
- package/benchmark/stats/feature-counts.d.ts +6 -0
- package/benchmark/stats/feature-counts.js +61 -0
- package/benchmark/stats/print.js +20 -0
- package/benchmark/stats/sigdb-counts.d.ts +7 -0
- package/benchmark/stats/sigdb-counts.js +219 -0
- package/benchmark/stats/size-of.d.ts +6 -0
- package/benchmark/stats/size-of.js +8 -0
- package/benchmark/stats/stats.d.ts +79 -0
- package/benchmark/stats/stats.js +7 -1
- package/benchmark/stopwatch.d.ts +4 -0
- package/benchmark/stopwatch.js +12 -1
- package/benchmark/summarizer/data.d.ts +17 -1
- package/benchmark/summarizer/first-phase/input.js +5 -0
- package/benchmark/summarizer/first-phase/process.js +12 -2
- package/benchmark/summarizer/second-phase/graph.d.ts +24 -1
- package/benchmark/summarizer/second-phase/graph.js +249 -18
- package/benchmark/summarizer/second-phase/process.js +56 -0
- package/benchmark/summarizer/summarizer.js +1 -2
- package/cli/benchmark-app.d.ts +1 -0
- package/cli/benchmark-app.js +2 -1
- package/cli/benchmark-helper-app.d.ts +1 -0
- package/cli/benchmark-helper-app.js +12 -2
- package/cli/common/options.d.ts +10 -0
- package/cli/common/options.js +3 -1
- package/cli/common/scripts-info.d.ts +10 -0
- package/cli/repl/commands/repl-cfg.js +2 -42
- package/cli/repl/commands/repl-clipboard.d.ts +7 -0
- package/cli/repl/commands/repl-clipboard.js +53 -0
- package/cli/repl/commands/repl-dataflow.js +5 -70
- package/cli/repl/commands/repl-normalize.js +3 -51
- package/control-flow/cfg-builder.d.ts +30 -0
- package/control-flow/cfg-builder.js +79 -0
- package/control-flow/cfg-dead-code.js +5 -29
- package/control-flow/diff-cfg.js +2 -56
- package/control-flow/extract-cfg.js +17 -10
- package/control-flow/semantic-cfg-guided-visitor.d.ts +7 -0
- package/control-flow/semantic-cfg-guided-visitor.js +14 -0
- package/control-flow/useless-loop.js +4 -26
- package/core/steps/all/core/10-normalize.d.ts +8 -0
- package/core/steps/all/core/10-normalize.js +10 -8
- package/core/steps/all/core/11-normalize-tree-sitter.d.ts +5 -7
- package/core/steps/all/core/11-normalize-tree-sitter.js +2 -9
- package/data/r-base-packages.generated.d.ts +1 -0
- package/data/r-base-packages.generated.js +5 -3
- package/dataflow/environments/apply-kill.d.ts +3 -3
- package/dataflow/environments/apply-kill.js +60 -31
- package/dataflow/environments/built-in-config.d.ts +9 -1
- package/dataflow/environments/built-in-proc-name.d.ts +2 -0
- package/dataflow/environments/built-in-proc-name.js +2 -0
- package/dataflow/environments/built-in-props.d.ts +4 -0
- package/dataflow/environments/built-in-props.js +3 -3
- package/dataflow/environments/built-in.d.ts +4 -2
- package/dataflow/environments/built-in.js +53 -3
- package/dataflow/environments/data-masking-functions.d.ts +3 -4
- package/dataflow/environments/data-masking-functions.js +7 -8
- package/dataflow/environments/default-builtin-config.d.ts +92 -12
- package/dataflow/environments/default-builtin-config.js +86 -43
- package/dataflow/environments/environment.d.ts +5 -0
- package/dataflow/environments/environment.js +17 -12
- package/dataflow/environments/identifier.d.ts +3 -0
- package/dataflow/environments/reference-to-maybe.d.ts +5 -3
- package/dataflow/environments/reference-to-maybe.js +17 -52
- package/dataflow/environments/resolve-helper.d.ts +2 -1
- package/dataflow/environments/resolve-helper.js +2 -1
- package/dataflow/eval/resolve/alias-tracking.js +4 -7
- package/dataflow/eval/resolve/node-value.d.ts +51 -0
- package/dataflow/eval/resolve/node-value.js +71 -0
- package/dataflow/eval/resolve/resolve-argument.js +10 -7
- package/dataflow/eval/resolve/resolve-operators.js +1 -2
- package/dataflow/eval/values/general.d.ts +4 -0
- package/dataflow/eval/values/general.js +11 -0
- package/dataflow/eval/values/r-value.d.ts +15 -0
- package/dataflow/eval/values/r-value.js +27 -1
- package/dataflow/extractor.js +2 -0
- package/dataflow/fn/higher-order-function.js +2 -3
- package/dataflow/graph/df-helper.d.ts +2 -1
- package/dataflow/graph/diff-dataflow-graph.js +3 -55
- package/dataflow/graph/graph.d.ts +5 -0
- package/dataflow/graph/graph.js +27 -0
- package/dataflow/info.d.ts +7 -1
- package/dataflow/info.js +36 -7
- package/dataflow/internal/linker.d.ts +23 -0
- package/dataflow/internal/linker.js +70 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-access.js +4 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.d.ts +2 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +8 -29
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +39 -6
- package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +10 -22
- package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +29 -53
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +33 -10
- package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +4 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +4 -5
- package/dataflow/internal/process/functions/call/built-in/built-in-library.js +7 -7
- package/dataflow/internal/process/functions/call/built-in/built-in-load.js +2 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-local.js +6 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-pipe.js +19 -12
- package/dataflow/internal/process/functions/call/built-in/built-in-purrr-formula.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-quote.d.ts +3 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-quote.js +69 -52
- package/dataflow/internal/process/functions/call/built-in/built-in-recall.js +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-register-hook.js +2 -8
- package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +7 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +2 -8
- package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.js +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.js +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-source.d.ts +5 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-source.js +23 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.d.ts +5 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.js +7 -10
- package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.d.ts +6 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.js +20 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-stop-if-not.js +6 -8
- package/dataflow/internal/process/functions/call/built-in/built-in-string-template.d.ts +25 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-string-template.js +105 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.js +9 -28
- package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +4 -5
- package/dataflow/internal/process/functions/call/built-in/built-in-with.js +1 -1
- package/dataflow/internal/process/functions/call/deferred.d.ts +41 -0
- package/dataflow/internal/process/functions/call/deferred.js +127 -0
- package/dataflow/internal/process/functions/call/known-call-handling.d.ts +13 -12
- package/dataflow/internal/process/functions/call/known-call-handling.js +35 -35
- package/dataflow/internal/process/functions/call/named-call-handling.d.ts +1 -1
- package/dataflow/internal/process/functions/call/named-call-handling.js +8 -4
- package/dataflow/internal/process/functions/call/nse.d.ts +28 -0
- package/dataflow/internal/process/functions/call/nse.js +87 -0
- package/dataflow/internal/process/functions/call/quoted.d.ts +29 -0
- package/dataflow/internal/process/functions/call/quoted.js +188 -0
- package/documentation/doc-readme.js +5 -2
- package/documentation/doc-util/doc-issue.d.ts +2 -0
- package/documentation/doc-util/doc-issue.js +3 -1
- package/documentation/doc-util/doc-types.js +15 -9
- package/documentation/wiki-dataflow-graph.js +4 -0
- package/documentation/wiki-faq.js +6 -2
- package/documentation/wiki-onboarding.js +11 -1
- package/documentation/wiki-setup.js +2 -1
- package/linter/rules/deprecated-functions.js +9 -3
- package/linter/rules/seeded-randomness.js +2 -3
- package/linter/rules/undefined-symbol.js +10 -1
- package/package.json +9 -4
- package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.d.ts +6 -0
- package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.js +17 -1
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-qmd-file-plugin.d.ts +2 -11
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-qmd-file-plugin.js +3 -15
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmarkdown-file-plugin.d.ts +16 -0
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmarkdown-file-plugin.js +26 -0
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmd-file-plugin.d.ts +2 -11
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmd-file-plugin.js +3 -15
- package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-description-file-plugin.js +4 -10
- package/project/plugins/package-version-plugins/flowr-analyzer-meta-description-file-plugin.js +2 -9
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-description-file-plugin.js +2 -9
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +1 -1
- package/project/sigdb/reader.d.ts +9 -0
- package/project/sigdb/reader.js +30 -0
- package/queries/catalog/input-sources-query/input-sources-query-format.js +1 -1
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-executor.d.ts +0 -12
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-executor.js +2 -37
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.js +2 -23
- package/queries/catalog/inspect-recursion-query/inspect-recursion-query-executor.js +2 -2
- package/queries/query-function-filter.d.ts +21 -0
- package/queries/query-function-filter.js +48 -0
- package/r-bridge/data/data.d.ts +13 -3
- package/r-bridge/data/data.js +15 -3
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.js +4 -0
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +11 -9
- package/search/flowr-search-filters.d.ts +5 -1
- package/search/flowr-search-filters.js +31 -21
- package/search/search-executor/search-enrichers.d.ts +24 -4
- package/search/search-executor/search-enrichers.js +22 -9
- package/search/search-executor/search-transformer.js +1 -1
- package/slicing/static/slice-call.js +4 -4
- package/util/diff-graph.d.ts +13 -0
- package/util/diff-graph.js +64 -1
- package/util/files.js +9 -8
- package/util/node-version.d.ts +4 -0
- package/util/node-version.js +29 -0
- package/util/r-base-packages.d.ts +2 -0
- package/util/r-base-packages.js +3 -1
- package/util/version.js +1 -1
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.countSignatureDatabase = countSignatureDatabase;
|
|
7
|
+
/**
|
|
8
|
+
* Counts what the signature database mounted on the benchmarking machine carries, so a release also shows
|
|
9
|
+
* how the database grew. Everything is read from the manifests and the bundle headers, i.e. without unpacking
|
|
10
|
+
* a bundle, the one exception being the small base-R bundle whose entries are walked for {@link SigDbBaseCounts}.
|
|
11
|
+
* @module
|
|
12
|
+
*/
|
|
13
|
+
const fs_1 = __importDefault(require("fs"));
|
|
14
|
+
const path_1 = __importDefault(require("path"));
|
|
15
|
+
const manifest_1 = require("../../project/sigdb/manifest");
|
|
16
|
+
const decompress_1 = require("../../project/sigdb/decompress");
|
|
17
|
+
const index_format_1 = require("../../project/sigdb/index-format");
|
|
18
|
+
const reader_1 = require("../../project/sigdb/reader");
|
|
19
|
+
const schema_1 = require("../../project/sigdb/schema");
|
|
20
|
+
/** what a temporal tier of a bundle keeps, in the words the wiki uses for it */
|
|
21
|
+
const KindOfTier = {
|
|
22
|
+
current: 'latest only',
|
|
23
|
+
full: 'full history',
|
|
24
|
+
history: 'older only'
|
|
25
|
+
};
|
|
26
|
+
const ManifestFile = /\.manifest\.json(\.(br|zst|gz))?$/;
|
|
27
|
+
function sizeOf(file) {
|
|
28
|
+
try {
|
|
29
|
+
return fs_1.default.statSync(file).size;
|
|
30
|
+
}
|
|
31
|
+
catch {
|
|
32
|
+
return 0;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
async function contentOf(file) {
|
|
36
|
+
try {
|
|
37
|
+
return (await (0, decompress_1.readHeaderOf)(file))?.content;
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
return undefined;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
/** the kind a shard belongs to, falling back to its tier so an unknown tier still gets a counter of its own */
|
|
44
|
+
function kindOf(tier) {
|
|
45
|
+
const name = String(tier ?? 'unknown');
|
|
46
|
+
return KindOfTier[name] ?? name;
|
|
47
|
+
}
|
|
48
|
+
function add(into, key, value) {
|
|
49
|
+
into[key] = (into[key] ?? 0) + value;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Every distinct shard of every discovered bundle, plus the dictionaries and manifests they need. A shard id a
|
|
53
|
+
* later manifest ships again is skipped (the two copies hold the same packages), and with it that manifest's
|
|
54
|
+
* dictionary, so nothing is counted twice.
|
|
55
|
+
*/
|
|
56
|
+
function collectBundles(paths) {
|
|
57
|
+
const bundles = [];
|
|
58
|
+
const seen = new Set();
|
|
59
|
+
let dictionaries = 0;
|
|
60
|
+
let manifests = 0;
|
|
61
|
+
for (const p of paths) {
|
|
62
|
+
if (!ManifestFile.test(p)) {
|
|
63
|
+
// a standalone bundle, which is a database of one shard without a manifest around it
|
|
64
|
+
const id = path_1.default.basename(p);
|
|
65
|
+
if (!seen.has(id)) {
|
|
66
|
+
seen.add(id);
|
|
67
|
+
bundles.push({ id, ref: { id, tier: 'full', path: p, hash: '', packages: 0, versions: 0 }, file: p, manifest: undefined });
|
|
68
|
+
}
|
|
69
|
+
continue;
|
|
70
|
+
}
|
|
71
|
+
let manifest;
|
|
72
|
+
try {
|
|
73
|
+
manifest = (0, manifest_1.readManifestFile)(p);
|
|
74
|
+
}
|
|
75
|
+
catch (e) {
|
|
76
|
+
console.log(` skipping signature database manifest ${p}: ${e.message}`);
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
const baseDir = path_1.default.dirname(p);
|
|
80
|
+
const own = (manifest.shards ?? []).filter(s => s?.id !== undefined && !seen.has(s.id));
|
|
81
|
+
if (own.length === 0) {
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
for (const ref of own) {
|
|
85
|
+
seen.add(ref.id);
|
|
86
|
+
bundles.push({ id: ref.id, ref, file: (0, decompress_1.resolveSource)(baseDir, ref.path), manifest });
|
|
87
|
+
}
|
|
88
|
+
manifests += sizeOf(p);
|
|
89
|
+
for (const dict of manifest.dicts ?? []) {
|
|
90
|
+
dictionaries += sizeOf((0, decompress_1.resolveSource)(baseDir, dict.path));
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return { bundles, dictionaries, manifests };
|
|
94
|
+
}
|
|
95
|
+
/** every package name the bundles route, so the same package in several bundles is only counted once */
|
|
96
|
+
function countPackages(bundles) {
|
|
97
|
+
const names = new Set();
|
|
98
|
+
for (const { ref, manifest } of bundles) {
|
|
99
|
+
for (const name of Object.keys(ref.idx?.p ?? {})) {
|
|
100
|
+
names.add(name);
|
|
101
|
+
}
|
|
102
|
+
for (const name of Object.keys(manifest?.meta ?? {})) {
|
|
103
|
+
names.add(name);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return names.size > 0 ? names.size : Math.max(0, ...bundles.map(b => b.ref.packages ?? 0));
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Walk the base-R bundle of the newest R release and count what its function records carry. It is a few
|
|
110
|
+
* hundred KiB unpacked, so this stays in the milliseconds; only the numeric tuples are read, no string
|
|
111
|
+
* dictionary is needed for them.
|
|
112
|
+
*/
|
|
113
|
+
async function countBaseEntries(bundles) {
|
|
114
|
+
const base = bundles.find(b => b.ref.tier === 'current' && b.id.startsWith('base'));
|
|
115
|
+
if (base === undefined) {
|
|
116
|
+
return undefined;
|
|
117
|
+
}
|
|
118
|
+
let db;
|
|
119
|
+
try {
|
|
120
|
+
db = await reader_1.SigDatabase.open(base.file, {
|
|
121
|
+
hash: base.ref.hash,
|
|
122
|
+
index: base.ref.idx ? (0, index_format_1.decodeIndex)(base.ref.idx, base.manifest?.meta) : undefined
|
|
123
|
+
});
|
|
124
|
+
const carrying = {
|
|
125
|
+
'with parameters': 0,
|
|
126
|
+
'with a call graph': 0,
|
|
127
|
+
'with a source location': 0,
|
|
128
|
+
'with a help topic': 0
|
|
129
|
+
};
|
|
130
|
+
for (const name of Object.values(schema_1.FnPropNames)) {
|
|
131
|
+
carrying[name] = 0;
|
|
132
|
+
}
|
|
133
|
+
let functions = 0;
|
|
134
|
+
let parameters = 0;
|
|
135
|
+
for (const blob of db.allBlobs()) {
|
|
136
|
+
for (const fn of blob.fns ?? []) {
|
|
137
|
+
functions++;
|
|
138
|
+
const [, sigIdx, cgIdx, props, fileIdx] = fn;
|
|
139
|
+
if (sigIdx >= 0) {
|
|
140
|
+
carrying['with parameters']++;
|
|
141
|
+
parameters += blob.sigs[sigIdx]?.length ?? 0;
|
|
142
|
+
}
|
|
143
|
+
if (cgIdx >= 0) {
|
|
144
|
+
carrying['with a call graph']++;
|
|
145
|
+
}
|
|
146
|
+
if (fileIdx >= 0) {
|
|
147
|
+
carrying['with a source location']++;
|
|
148
|
+
}
|
|
149
|
+
if (fn.length > 6) {
|
|
150
|
+
carrying['with a help topic']++;
|
|
151
|
+
}
|
|
152
|
+
for (const [bit, name] of Object.entries(schema_1.FnPropNames)) {
|
|
153
|
+
if ((props & Number(bit)) !== 0) {
|
|
154
|
+
carrying[name]++;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
return { functions, parameters, functionsCarrying: carrying };
|
|
160
|
+
}
|
|
161
|
+
catch (e) {
|
|
162
|
+
console.log(` skipping the signature database entry breakdown: ${e.message}`);
|
|
163
|
+
return undefined;
|
|
164
|
+
}
|
|
165
|
+
finally {
|
|
166
|
+
db?.close();
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Counts the bundles of the mounted signature database, what they describe, and what they occupy.
|
|
171
|
+
* Every step is defensive, as this also runs against older databases when the history is filled in, and a
|
|
172
|
+
* machine without a mounted database simply yields `undefined` instead of failing the benchmark.
|
|
173
|
+
*/
|
|
174
|
+
async function countSignatureDatabase() {
|
|
175
|
+
let paths;
|
|
176
|
+
try {
|
|
177
|
+
paths = (0, manifest_1.defaultSigDbPaths)();
|
|
178
|
+
}
|
|
179
|
+
catch (e) {
|
|
180
|
+
console.log(` no signature database counted: ${e.message}`);
|
|
181
|
+
return undefined;
|
|
182
|
+
}
|
|
183
|
+
const { bundles, dictionaries, manifests } = collectBundles(paths);
|
|
184
|
+
if (bundles.length === 0) {
|
|
185
|
+
console.log(' no signature database is mounted, its counters are left out');
|
|
186
|
+
return undefined;
|
|
187
|
+
}
|
|
188
|
+
const bundlesByKind = {};
|
|
189
|
+
const functionsByKind = {};
|
|
190
|
+
const sizeByKind = {};
|
|
191
|
+
let packageVersions = 0;
|
|
192
|
+
let functions = 0;
|
|
193
|
+
let size = dictionaries + manifests;
|
|
194
|
+
for (const bundle of bundles) {
|
|
195
|
+
const content = await contentOf(bundle.file);
|
|
196
|
+
const kind = kindOf(content?.tier ?? bundle.ref.tier);
|
|
197
|
+
const bytes = sizeOf(bundle.file);
|
|
198
|
+
add(bundlesByKind, kind, 1);
|
|
199
|
+
add(functionsByKind, kind, content?.functions ?? 0);
|
|
200
|
+
add(sizeByKind, kind, bytes);
|
|
201
|
+
packageVersions += content?.versions ?? bundle.ref.versions ?? 0;
|
|
202
|
+
functions += content?.functions ?? 0;
|
|
203
|
+
size += bytes;
|
|
204
|
+
}
|
|
205
|
+
return {
|
|
206
|
+
bundles: bundles.length,
|
|
207
|
+
bundlesByKind,
|
|
208
|
+
packages: countPackages(bundles),
|
|
209
|
+
packageVersions,
|
|
210
|
+
functions,
|
|
211
|
+
functionsByKind,
|
|
212
|
+
sizeByKind,
|
|
213
|
+
sizeOfDictionaries: dictionaries,
|
|
214
|
+
sizeOfManifests: manifests,
|
|
215
|
+
size,
|
|
216
|
+
base: await countBaseEntries(bundles)
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
//# sourceMappingURL=sigdb-counts.js.map
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import type { DataflowGraph } from '../../dataflow/graph/graph';
|
|
2
|
+
import type { ControlFlowGraph } from '../../control-flow/control-flow-graph';
|
|
2
3
|
/** Returns the size of the given df graph in bytes (without sharing in-memory) */
|
|
3
4
|
export declare function getSizeOfDfGraph(df: DataflowGraph): number;
|
|
5
|
+
/**
|
|
6
|
+
* Calculates the size of the control flow graph in bytes, counting its vertices and edges like
|
|
7
|
+
* {@link getSizeOfDfGraph} does for the dataflow graph.
|
|
8
|
+
*/
|
|
9
|
+
export declare function getSizeOfCfGraph(cfg: ControlFlowGraph): number;
|
|
4
10
|
/**
|
|
5
11
|
* Calculates the size of an array in bytes.
|
|
6
12
|
* @param array - The array to calculate the size of.
|
|
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getSizeOfDfGraph = getSizeOfDfGraph;
|
|
7
|
+
exports.getSizeOfCfGraph = getSizeOfCfGraph;
|
|
7
8
|
exports.safeSizeOf = safeSizeOf;
|
|
8
9
|
const vertex_1 = require("../../dataflow/graph/vertex");
|
|
9
10
|
const identifier_1 = require("../../dataflow/environments/identifier");
|
|
@@ -68,6 +69,13 @@ function getSizeOfDfGraph(df) {
|
|
|
68
69
|
}
|
|
69
70
|
return safeSizeOf([...verts, ...df.edges()]);
|
|
70
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* Calculates the size of the control flow graph in bytes, counting its vertices and edges like
|
|
74
|
+
* {@link getSizeOfDfGraph} does for the dataflow graph.
|
|
75
|
+
*/
|
|
76
|
+
function getSizeOfCfGraph(cfg) {
|
|
77
|
+
return safeSizeOf([...cfg.vertices(true).values(), ...cfg.edges()]);
|
|
78
|
+
}
|
|
71
79
|
/**
|
|
72
80
|
* Calculates the size of an array in bytes.
|
|
73
81
|
* @param array - The array to calculate the size of.
|
|
@@ -11,6 +11,13 @@ export declare const CommonSlicerMeasurements: readonly ["initialize R session",
|
|
|
11
11
|
export type CommonSlicerMeasurements = typeof CommonSlicerMeasurements[number];
|
|
12
12
|
export declare const PerSliceMeasurements: readonly ["static slicing", "reconstruct code", "total"];
|
|
13
13
|
export type PerSliceMeasurements = typeof PerSliceMeasurements[number];
|
|
14
|
+
/**
|
|
15
|
+
* Measurements that are taken *after* all {@link CommonSlicerMeasurements} and hence do not count towards them
|
|
16
|
+
* (especially not towards the `total`).
|
|
17
|
+
* They may be missing if the corresponding phase failed or was never run.
|
|
18
|
+
*/
|
|
19
|
+
export declare const AdditionalSlicerMeasurements: readonly ["dependencies query", "linter run", "calibration"];
|
|
20
|
+
export type AdditionalSlicerMeasurements = typeof AdditionalSlicerMeasurements[number];
|
|
14
21
|
export type ElapsedTime = bigint;
|
|
15
22
|
export interface PerSliceStats {
|
|
16
23
|
measurements: Map<PerSliceMeasurements, ElapsedTime>;
|
|
@@ -41,6 +48,69 @@ export interface SlicerStatsDataflow<T = number> {
|
|
|
41
48
|
numberOfFunctionDefinitions: T;
|
|
42
49
|
sizeOfObject: T;
|
|
43
50
|
}
|
|
51
|
+
/** what the benchmarked flowR version carries, counted once per run */
|
|
52
|
+
export interface FlowrFeatureCounts {
|
|
53
|
+
lintingRules: number;
|
|
54
|
+
queries: number;
|
|
55
|
+
builtinDefinitions: number;
|
|
56
|
+
/** built-ins handled by the default processor, which only reads its arguments */
|
|
57
|
+
builtinDefinitionsDefault: number;
|
|
58
|
+
/** built-ins with a processor of their own */
|
|
59
|
+
builtinDefinitionsCustom: number;
|
|
60
|
+
/** built-ins that also carry a value solver, see the built-in eval handlers */
|
|
61
|
+
builtinDefinitionsWithEvalHandler: number;
|
|
62
|
+
/** how many linting rules carry each tag, a rule usually carries several */
|
|
63
|
+
lintingRulesByTag: Record<string, number>;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* What the entries of the base-R bundle carry, counted by walking its function records once.
|
|
67
|
+
* Only that one bundle is walked, it is the part every install ships and the only one small enough
|
|
68
|
+
* to read without unpacking megabytes (see {@link SigDbCounts}).
|
|
69
|
+
*/
|
|
70
|
+
export interface SigDbBaseCounts {
|
|
71
|
+
/** unique function records in the bundle's pool (a record shared by several versions counts once) */
|
|
72
|
+
readonly functions: number;
|
|
73
|
+
/** total number of parameters over all of those records */
|
|
74
|
+
readonly parameters: number;
|
|
75
|
+
/**
|
|
76
|
+
* how many of the records carry each piece of information: a parameter list, a call graph, a source
|
|
77
|
+
* location, a help topic, and one entry per function property flag the format defines
|
|
78
|
+
*/
|
|
79
|
+
readonly functionsCarrying: Record<string, number>;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* What the signature database mounted on the benchmarking machine carries, counted once per run.
|
|
83
|
+
* `undefined` when no database is mounted. Bundles are the distinct shards of the discovered manifests
|
|
84
|
+
* (a shard a second manifest ships again is counted once), and a *kind* is a shard's temporal tier.
|
|
85
|
+
*/
|
|
86
|
+
export interface SigDbCounts {
|
|
87
|
+
/** distinct shards over all discovered bundles */
|
|
88
|
+
readonly bundles: number;
|
|
89
|
+
/** how many bundles each kind contributes, e.g. `latest only` or `full history` */
|
|
90
|
+
readonly bundlesByKind: Record<string, number>;
|
|
91
|
+
/** distinct package names the database describes */
|
|
92
|
+
readonly packages: number;
|
|
93
|
+
/** package versions the bundles store, summed (a kind-wise split would overlap, so there is none) */
|
|
94
|
+
readonly packageVersions: number;
|
|
95
|
+
/** function records the bundles store, summed over the bundles */
|
|
96
|
+
readonly functions: number;
|
|
97
|
+
/** function records per kind, a partition: every record belongs to exactly one bundle */
|
|
98
|
+
readonly functionsByKind: Record<string, number>;
|
|
99
|
+
/** bytes the bundles of each kind occupy on disk, in the codec this runtime reads */
|
|
100
|
+
readonly sizeByKind: Record<string, number>;
|
|
101
|
+
/** bytes of the shared string dictionaries */
|
|
102
|
+
readonly sizeOfDictionaries: number;
|
|
103
|
+
/** bytes of the manifests themselves */
|
|
104
|
+
readonly sizeOfManifests: number;
|
|
105
|
+
/** bytes of everything the database occupies */
|
|
106
|
+
readonly size: number;
|
|
107
|
+
readonly base?: SigDbBaseCounts;
|
|
108
|
+
}
|
|
109
|
+
export interface SlicerStatsControlFlow<T = number> {
|
|
110
|
+
numberOfVertices: T;
|
|
111
|
+
numberOfEdges: T;
|
|
112
|
+
sizeOfObject: T;
|
|
113
|
+
}
|
|
44
114
|
export interface SlicerStatsDfShape<T = number> {
|
|
45
115
|
numberOfDataFrameFiles: T extends number ? 0 | 1 : number;
|
|
46
116
|
numberOfNonDataFrameFiles: T extends number ? 0 | 1 : number;
|
|
@@ -81,10 +151,13 @@ export interface BenchmarkMemoryMeasurement<T = number> extends MergeableRecord
|
|
|
81
151
|
export interface SlicerStats {
|
|
82
152
|
commonMeasurements: Map<CommonSlicerMeasurements, ElapsedTime>;
|
|
83
153
|
perSliceMeasurements: Map<SlicingCriteria, PerSliceStats>;
|
|
154
|
+
/** measured after all {@link commonMeasurements}, see {@link AdditionalSlicerMeasurements} */
|
|
155
|
+
additionalMeasurements: Map<AdditionalSlicerMeasurements, ElapsedTime>;
|
|
84
156
|
memory: Map<CommonSlicerMeasurements, BenchmarkMemoryMeasurement>;
|
|
85
157
|
request: RParseRequestFromFile | RParseRequestFromText;
|
|
86
158
|
input: SlicerStatsInput;
|
|
87
159
|
dataflow: SlicerStatsDataflow;
|
|
160
|
+
controlFlow?: SlicerStatsControlFlow;
|
|
88
161
|
dataFrameShape?: SlicerStatsDfShape;
|
|
89
162
|
retrieveTimePerToken: TimePerToken<number>;
|
|
90
163
|
normalizeTimePerToken: TimePerToken<number>;
|
|
@@ -93,4 +166,10 @@ export interface SlicerStats {
|
|
|
93
166
|
controlFlowTimePerToken?: TimePerToken<number>;
|
|
94
167
|
callGraphTimePerToken?: TimePerToken<number>;
|
|
95
168
|
dataFrameShapeTimePerToken?: TimePerToken<number>;
|
|
169
|
+
/** time in nanoseconds per 100 lines of the input, the pendant to {@link retrieveTimePerToken} */
|
|
170
|
+
retrieveTimePer100Lines: number;
|
|
171
|
+
normalizeTimePer100Lines: number;
|
|
172
|
+
dataflowTimePer100Lines: number;
|
|
173
|
+
totalCommonTimePer100Lines: number;
|
|
174
|
+
controlFlowTimePer100Lines?: number;
|
|
96
175
|
}
|
package/benchmark/stats/stats.js
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PerSliceMeasurements = exports.CommonSlicerMeasurements = exports.OptionalSlicerMeasurements = exports.RequiredSlicerMeasurements = void 0;
|
|
3
|
+
exports.AdditionalSlicerMeasurements = exports.PerSliceMeasurements = exports.CommonSlicerMeasurements = exports.OptionalSlicerMeasurements = exports.RequiredSlicerMeasurements = void 0;
|
|
4
4
|
exports.RequiredSlicerMeasurements = ['initialize R session', 'retrieve AST from R code', 'normalize R AST', 'produce dataflow information', 'close R session', 'total'];
|
|
5
5
|
exports.OptionalSlicerMeasurements = ['extract control flow graph', 'infer data frame shapes', 'extract call graph'];
|
|
6
6
|
exports.CommonSlicerMeasurements = [...exports.RequiredSlicerMeasurements, ...exports.OptionalSlicerMeasurements];
|
|
7
7
|
exports.PerSliceMeasurements = ['static slicing', 'reconstruct code', 'total'];
|
|
8
|
+
/**
|
|
9
|
+
* Measurements that are taken *after* all {@link CommonSlicerMeasurements} and hence do not count towards them
|
|
10
|
+
* (especially not towards the `total`).
|
|
11
|
+
* They may be missing if the corresponding phase failed or was never run.
|
|
12
|
+
*/
|
|
13
|
+
exports.AdditionalSlicerMeasurements = ['dependencies query', 'linter run', 'calibration'];
|
|
8
14
|
//# sourceMappingURL=stats.js.map
|
package/benchmark/stopwatch.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
export interface IStoppableStopwatch {
|
|
2
2
|
/** Stop the given stopwatch. */
|
|
3
3
|
stop(): void;
|
|
4
|
+
/** Exclude everything that happens until the next {@link resume} from the elapsed time. */
|
|
5
|
+
pause(): void;
|
|
6
|
+
/** Continue after a {@link pause}, does nothing if the stopwatch is not paused. */
|
|
7
|
+
resume(): void;
|
|
4
8
|
}
|
|
5
9
|
/**
|
|
6
10
|
* Allows to measure keys of type `T` with a `Stopwatch`.
|
package/benchmark/stopwatch.js
CHANGED
|
@@ -6,6 +6,8 @@ const assert_1 = require("../util/assert");
|
|
|
6
6
|
class Stopwatch {
|
|
7
7
|
timeStart;
|
|
8
8
|
timeEnd;
|
|
9
|
+
pauseStart;
|
|
10
|
+
pausedTotal = 0n;
|
|
9
11
|
stopped = false;
|
|
10
12
|
start() {
|
|
11
13
|
this.timeStart = process.hrtime.bigint();
|
|
@@ -16,9 +18,18 @@ class Stopwatch {
|
|
|
16
18
|
(0, assert_1.guard)(!this.stopped, 'cannot stop a stopwatch twice');
|
|
17
19
|
this.stopped = true;
|
|
18
20
|
}
|
|
21
|
+
pause() {
|
|
22
|
+
this.pauseStart ??= process.hrtime.bigint();
|
|
23
|
+
}
|
|
24
|
+
resume() {
|
|
25
|
+
if (this.pauseStart !== undefined) {
|
|
26
|
+
this.pausedTotal += process.hrtime.bigint() - this.pauseStart;
|
|
27
|
+
this.pauseStart = undefined;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
19
30
|
get() {
|
|
20
31
|
(0, assert_1.guard)(this.timeStart !== undefined && this.timeEnd !== undefined, 'cannot get elapsed time as the stopwatch has not been started/stopped');
|
|
21
|
-
return this.timeEnd - this.timeStart;
|
|
32
|
+
return this.timeEnd - this.timeStart - this.pausedTotal;
|
|
22
33
|
}
|
|
23
34
|
}
|
|
24
35
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DataFrameOperationName } from '../../abstract-interpretation/data-frame/semantics';
|
|
2
2
|
import type { SummarizedMeasurement } from '../../util/summarizer';
|
|
3
|
-
import type { CommonSlicerMeasurements, PerSliceMeasurements, SlicerStats, SlicerStatsDfShape, SlicerStatsDataflow, SlicerStatsInput } from '../stats/stats';
|
|
3
|
+
import type { AdditionalSlicerMeasurements, CommonSlicerMeasurements, PerSliceMeasurements, SlicerStats, SlicerStatsDfShape, SlicerStatsControlFlow, SlicerStatsDataflow, SlicerStatsInput } from '../stats/stats';
|
|
4
4
|
export interface SliceSizeCollection {
|
|
5
5
|
lines: number[];
|
|
6
6
|
nonEmptyLines: number[];
|
|
@@ -46,6 +46,10 @@ export interface SummarizedPerSliceStats {
|
|
|
46
46
|
sliceTimePerToken: TimePerToken;
|
|
47
47
|
reconstructTimePerToken: TimePerToken;
|
|
48
48
|
totalPerSliceTimePerToken: TimePerToken;
|
|
49
|
+
/** the per 100 lines of input pendant to {@link sliceTimePerToken} */
|
|
50
|
+
sliceTimePer100Lines: SummarizedMeasurement;
|
|
51
|
+
reconstructTimePer100Lines: SummarizedMeasurement;
|
|
52
|
+
totalPerSliceTimePer100Lines: SummarizedMeasurement;
|
|
49
53
|
reduction: Reduction<SummarizedMeasurement>;
|
|
50
54
|
/** reduction, but without taking into account comments and empty lines */
|
|
51
55
|
reductionNoFluff: Reduction<SummarizedMeasurement>;
|
|
@@ -60,6 +64,8 @@ export interface UltimateSlicerStats {
|
|
|
60
64
|
totalSlices: number;
|
|
61
65
|
commonMeasurements: Map<CommonSlicerMeasurements, SummarizedMeasurement>;
|
|
62
66
|
perSliceMeasurements: Map<PerSliceMeasurements, SummarizedMeasurement>;
|
|
67
|
+
/** measured after all {@link commonMeasurements}, see {@link AdditionalSlicerMeasurements} */
|
|
68
|
+
additionalMeasurements: Map<AdditionalSlicerMeasurements, SummarizedMeasurement>;
|
|
63
69
|
retrieveTimePerToken: TimePerToken;
|
|
64
70
|
normalizeTimePerToken: TimePerToken;
|
|
65
71
|
dataflowTimePerToken: TimePerToken;
|
|
@@ -70,6 +76,15 @@ export interface UltimateSlicerStats {
|
|
|
70
76
|
sliceTimePerToken: TimePerToken;
|
|
71
77
|
reconstructTimePerToken: TimePerToken;
|
|
72
78
|
totalPerSliceTimePerToken: TimePerToken;
|
|
79
|
+
/** the per 100 lines of input pendant to {@link retrieveTimePerToken} */
|
|
80
|
+
retrieveTimePer100Lines: SummarizedMeasurement;
|
|
81
|
+
normalizeTimePer100Lines: SummarizedMeasurement;
|
|
82
|
+
dataflowTimePer100Lines: SummarizedMeasurement;
|
|
83
|
+
totalCommonTimePer100Lines: SummarizedMeasurement;
|
|
84
|
+
controlFlowTimePer100Lines?: SummarizedMeasurement;
|
|
85
|
+
sliceTimePer100Lines: SummarizedMeasurement;
|
|
86
|
+
reconstructTimePer100Lines: SummarizedMeasurement;
|
|
87
|
+
totalPerSliceTimePer100Lines: SummarizedMeasurement;
|
|
73
88
|
/** sum */
|
|
74
89
|
failedToRepParse: number;
|
|
75
90
|
/** sum */
|
|
@@ -79,6 +94,7 @@ export interface UltimateSlicerStats {
|
|
|
79
94
|
reductionNoFluff: Reduction<SummarizedMeasurement>;
|
|
80
95
|
input: SlicerStatsInput<SummarizedMeasurement>;
|
|
81
96
|
dataflow: SlicerStatsDataflow<SummarizedMeasurement>;
|
|
97
|
+
controlFlow?: SlicerStatsControlFlow<SummarizedMeasurement>;
|
|
82
98
|
dataFrameShape?: SummarizedDfShapeStats<SummarizedMeasurement>;
|
|
83
99
|
}
|
|
84
100
|
export interface SummarizedDfShapeStats<T = number> extends Omit<SlicerStatsDfShape<T>, 'perNodeStats'> {
|
|
@@ -30,6 +30,11 @@ async function processRunMeasurement(line, fileNum, lineNum, textOutputAppendPat
|
|
|
30
30
|
(0, assert_1.guard)(v.endsWith('n'), 'Expected a bigint');
|
|
31
31
|
return [k, BigInt(v.slice(0, -1))];
|
|
32
32
|
})),
|
|
33
|
+
additionalMeasurements: new Map((got.stats.additionalMeasurements ?? [])
|
|
34
|
+
.map(([k, v]) => {
|
|
35
|
+
(0, assert_1.guard)(v.endsWith('n'), 'Expected a bigint');
|
|
36
|
+
return [k, BigInt(v.slice(0, -1))];
|
|
37
|
+
})),
|
|
33
38
|
perSliceMeasurements: new Map(got.stats.perSliceMeasurements
|
|
34
39
|
.map(([k, v]) => mapPerSliceStats(k, v))),
|
|
35
40
|
dataFrameShape: got.stats.dataFrameShape !== undefined ? {
|
|
@@ -115,6 +115,10 @@ async function summarizeSlicerStats(stats, report = () => {
|
|
|
115
115
|
const sliceTimes = [];
|
|
116
116
|
const reconstructTimes = [];
|
|
117
117
|
const totalTimes = [];
|
|
118
|
+
const sliceTimesPer100Lines = [];
|
|
119
|
+
const reconstructTimesPer100Lines = [];
|
|
120
|
+
const totalTimesPer100Lines = [];
|
|
121
|
+
const per100Lines = 100 / stats.input.numberOfLines;
|
|
118
122
|
const reductions = [];
|
|
119
123
|
const reductionsNoFluff = [];
|
|
120
124
|
let failedOutputs = 0;
|
|
@@ -140,6 +144,11 @@ async function summarizeSlicerStats(stats, report = () => {
|
|
|
140
144
|
}
|
|
141
145
|
sizeOfSliceCriteria.push(perSliceStat.slicingCriteria.length);
|
|
142
146
|
timesHitThreshold += perSliceStat.timesHitThreshold > 0 ? 1 : 0;
|
|
147
|
+
const sliceTime = Number(perSliceStat.measurements.get('static slicing'));
|
|
148
|
+
const reconstructTime = Number(perSliceStat.measurements.get('reconstruct code'));
|
|
149
|
+
sliceTimesPer100Lines.push(sliceTime * per100Lines);
|
|
150
|
+
reconstructTimesPer100Lines.push(reconstructTime * per100Lines);
|
|
151
|
+
totalTimesPer100Lines.push((sliceTime + reconstructTime) * per100Lines);
|
|
143
152
|
const { code: output, linesWithAutoSelected } = perSliceStat.reconstructedCode;
|
|
144
153
|
sliceSize.linesWithAutoSelected.push(linesWithAutoSelected);
|
|
145
154
|
const split = output.split('\n');
|
|
@@ -196,8 +205,6 @@ async function summarizeSlicerStats(stats, report = () => {
|
|
|
196
205
|
};
|
|
197
206
|
reductions.push(calculateReductionForSlice(stats.input, stats.dataflow, perSlice, false));
|
|
198
207
|
reductionsNoFluff.push(calculateReductionForSlice(stats.input, stats.dataflow, perSlice, true));
|
|
199
|
-
const sliceTime = Number(perSliceStat.measurements.get('static slicing'));
|
|
200
|
-
const reconstructTime = Number(perSliceStat.measurements.get('reconstruct code'));
|
|
201
208
|
sliceTimes.push({
|
|
202
209
|
raw: sliceTime / numberOfRTokens,
|
|
203
210
|
normalized: sliceTime / numberOfNormalizedTokens
|
|
@@ -237,6 +244,9 @@ async function summarizeSlicerStats(stats, report = () => {
|
|
|
237
244
|
sliceTimePerToken: summarizeTimePerToken(sliceTimes),
|
|
238
245
|
reconstructTimePerToken: summarizeTimePerToken(reconstructTimes),
|
|
239
246
|
totalPerSliceTimePerToken: summarizeTimePerToken(totalTimes),
|
|
247
|
+
sliceTimePer100Lines: (0, summarizer_1.summarizeMeasurement)(sliceTimesPer100Lines),
|
|
248
|
+
reconstructTimePer100Lines: (0, summarizer_1.summarizeMeasurement)(reconstructTimesPer100Lines),
|
|
249
|
+
totalPerSliceTimePer100Lines: (0, summarizer_1.summarizeMeasurement)(totalTimesPer100Lines),
|
|
240
250
|
sliceSize: {
|
|
241
251
|
lines: (0, summarizer_1.summarizeMeasurement)(sliceSize.lines),
|
|
242
252
|
nonEmptyLines: (0, summarizer_1.summarizeMeasurement)(sliceSize.nonEmptyLines),
|
|
@@ -1,7 +1,30 @@
|
|
|
1
1
|
import type { UltimateSlicerStats } from '../data';
|
|
2
|
+
import type { MergeableRecord } from '../../../util/objects';
|
|
3
|
+
interface BenchmarkGraphEntry extends MergeableRecord {
|
|
4
|
+
name: string;
|
|
5
|
+
unit: string;
|
|
6
|
+
value: number;
|
|
7
|
+
range?: string;
|
|
8
|
+
extra?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Whether an entry describes what the release *is* rather than how fast it *was*.
|
|
12
|
+
*
|
|
13
|
+
* The benchmark action compares every entry it uploads against the release before and calls a value that grew
|
|
14
|
+
* a regression. That is right for a runtime and wrong for a counter: a release with ten more linting rules or a
|
|
15
|
+
* larger signature database is not slower. Those entries are written to {@link infoGraphPath} instead and are
|
|
16
|
+
* uploaded under a suite of their own, where nothing alerts on them. The page merges the two back together.
|
|
17
|
+
*
|
|
18
|
+
* The failures are counters too, but a run that fails to re-parse more slices than the one before is exactly
|
|
19
|
+
* what an alert is for, so they stay with the measurements.
|
|
20
|
+
*/
|
|
21
|
+
export declare function isInfoEntry({ name, unit }: Pick<BenchmarkGraphEntry, 'name' | 'unit'>): boolean;
|
|
22
|
+
/** where the counters of `path` go, next to it, so that one upload can alert and the other cannot */
|
|
23
|
+
export declare function infoGraphPath(path: string): string;
|
|
2
24
|
/**
|
|
3
25
|
* Write the graph output for the ultimate slicer stats to a file
|
|
4
26
|
* @param ultimate - The ultimate slicer stats
|
|
5
27
|
* @param outputGraphPath - The path to write the graph output to
|
|
6
28
|
*/
|
|
7
|
-
export declare function writeGraphOutput(ultimate: UltimateSlicerStats, outputGraphPath: string): void
|
|
29
|
+
export declare function writeGraphOutput(ultimate: UltimateSlicerStats, outputGraphPath: string): Promise<void>;
|
|
30
|
+
export {};
|