@cobol-ts/cobolts 0.0.14 → 0.0.16

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 (188) hide show
  1. package/README.benchmark-formats.md +52 -0
  2. package/README.benchmark-reporting.md +16 -0
  3. package/README.benchmark.md +199 -0
  4. package/README.cel.md +112 -57
  5. package/README.md +166 -19
  6. package/README.periodic-verification.md +83 -0
  7. package/dist/src/benchmark.access.spec.d.ts +1 -0
  8. package/dist/src/benchmark.access.spec.js +30 -0
  9. package/dist/src/benchmark.access.spec.js.map +1 -0
  10. package/dist/src/benchmark.aggregate.fixture.d.ts +10 -0
  11. package/dist/src/benchmark.aggregate.fixture.js +108 -0
  12. package/dist/src/benchmark.aggregate.fixture.js.map +1 -0
  13. package/dist/src/benchmark.aggregate.fixture.spec.d.ts +1 -0
  14. package/dist/src/benchmark.aggregate.fixture.spec.js +116 -0
  15. package/dist/src/benchmark.aggregate.fixture.spec.js.map +1 -0
  16. package/dist/src/benchmark.allocations.cli.spec.d.ts +1 -0
  17. package/dist/src/benchmark.allocations.cli.spec.js +60 -0
  18. package/dist/src/benchmark.allocations.cli.spec.js.map +1 -0
  19. package/dist/src/benchmark.allocations.d.ts +19 -0
  20. package/dist/src/benchmark.allocations.js +82 -0
  21. package/dist/src/benchmark.allocations.js.map +1 -0
  22. package/dist/src/benchmark.allocations.spec.d.ts +1 -0
  23. package/dist/src/benchmark.allocations.spec.js +64 -0
  24. package/dist/src/benchmark.allocations.spec.js.map +1 -0
  25. package/dist/src/benchmark.cli.functional.spec.d.ts +1 -0
  26. package/dist/src/benchmark.cli.functional.spec.js +370 -0
  27. package/dist/src/benchmark.cli.functional.spec.js.map +1 -0
  28. package/dist/src/benchmark.cli.golden.spec.d.ts +1 -0
  29. package/dist/src/benchmark.cli.golden.spec.js +194 -0
  30. package/dist/src/benchmark.cli.golden.spec.js.map +1 -0
  31. package/dist/src/benchmark.composed.execution.spec.d.ts +1 -0
  32. package/dist/src/benchmark.composed.execution.spec.js +120 -0
  33. package/dist/src/benchmark.composed.execution.spec.js.map +1 -0
  34. package/dist/src/benchmark.composed.fixture.d.ts +4 -0
  35. package/dist/src/benchmark.composed.fixture.js +77 -0
  36. package/dist/src/benchmark.composed.fixture.js.map +1 -0
  37. package/dist/src/benchmark.composed.fixture.spec.d.ts +1 -0
  38. package/dist/src/benchmark.composed.fixture.spec.js +50 -0
  39. package/dist/src/benchmark.composed.fixture.spec.js.map +1 -0
  40. package/dist/src/benchmark.composed.runner.d.ts +13 -0
  41. package/dist/src/benchmark.composed.runner.js +221 -0
  42. package/dist/src/benchmark.composed.runner.js.map +1 -0
  43. package/dist/src/benchmark.composed.two.fixture.d.ts +5 -0
  44. package/dist/src/benchmark.composed.two.fixture.js +111 -0
  45. package/dist/src/benchmark.composed.two.fixture.js.map +1 -0
  46. package/dist/src/benchmark.composed.two.spec.d.ts +1 -0
  47. package/dist/src/benchmark.composed.two.spec.js +86 -0
  48. package/dist/src/benchmark.composed.two.spec.js.map +1 -0
  49. package/dist/src/benchmark.format.cli.functional.spec.d.ts +1 -0
  50. package/dist/src/benchmark.format.cli.functional.spec.js +44 -0
  51. package/dist/src/benchmark.format.cli.functional.spec.js.map +1 -0
  52. package/dist/src/benchmark.format.composition.spec.d.ts +1 -0
  53. package/dist/src/benchmark.format.composition.spec.js +196 -0
  54. package/dist/src/benchmark.format.composition.spec.js.map +1 -0
  55. package/dist/src/benchmark.format.family.cli.functional.spec.d.ts +1 -0
  56. package/dist/src/benchmark.format.family.cli.functional.spec.js +102 -0
  57. package/dist/src/benchmark.format.family.cli.functional.spec.js.map +1 -0
  58. package/dist/src/benchmark.format.fixture.d.ts +26 -0
  59. package/dist/src/benchmark.format.fixture.js +181 -0
  60. package/dist/src/benchmark.format.fixture.js.map +1 -0
  61. package/dist/src/benchmark.format.oracle.d.ts +8 -0
  62. package/dist/src/benchmark.format.oracle.js +30 -0
  63. package/dist/src/benchmark.format.oracle.js.map +1 -0
  64. package/dist/src/benchmark.format.runner.d.ts +6 -0
  65. package/dist/src/benchmark.format.runner.js +271 -0
  66. package/dist/src/benchmark.format.runner.js.map +1 -0
  67. package/dist/src/benchmark.format.source.d.ts +6 -0
  68. package/dist/src/benchmark.format.source.js +15 -0
  69. package/dist/src/benchmark.format.source.js.map +1 -0
  70. package/dist/src/benchmark.format.spec.d.ts +1 -0
  71. package/dist/src/benchmark.format.spec.js +85 -0
  72. package/dist/src/benchmark.format.spec.js.map +1 -0
  73. package/dist/src/benchmark.format.stateful.spec.d.ts +1 -0
  74. package/dist/src/benchmark.format.stateful.spec.js +120 -0
  75. package/dist/src/benchmark.format.stateful.spec.js.map +1 -0
  76. package/dist/src/benchmark.gc.d.ts +26 -0
  77. package/dist/src/benchmark.gc.js +62 -0
  78. package/dist/src/benchmark.gc.js.map +1 -0
  79. package/dist/src/benchmark.gc.spec.d.ts +1 -0
  80. package/dist/src/benchmark.gc.spec.js +26 -0
  81. package/dist/src/benchmark.gc.spec.js.map +1 -0
  82. package/dist/src/benchmark.periodic.execution.spec.d.ts +1 -0
  83. package/dist/src/benchmark.periodic.execution.spec.js +166 -0
  84. package/dist/src/benchmark.periodic.execution.spec.js.map +1 -0
  85. package/dist/src/benchmark.periodic.fixture.d.ts +5 -0
  86. package/dist/src/benchmark.periodic.fixture.js +69 -0
  87. package/dist/src/benchmark.periodic.fixture.js.map +1 -0
  88. package/dist/src/benchmark.periodic.fixture.spec.d.ts +1 -0
  89. package/dist/src/benchmark.periodic.fixture.spec.js +96 -0
  90. package/dist/src/benchmark.periodic.fixture.spec.js.map +1 -0
  91. package/dist/src/benchmark.profile.d.ts +8 -0
  92. package/dist/src/benchmark.profile.js +62 -0
  93. package/dist/src/benchmark.profile.js.map +1 -0
  94. package/dist/src/benchmark.profile.spec.d.ts +1 -0
  95. package/dist/src/benchmark.profile.spec.js +65 -0
  96. package/dist/src/benchmark.profile.spec.js.map +1 -0
  97. package/dist/src/benchmark.report.d.ts +113 -0
  98. package/dist/src/benchmark.report.js +279 -0
  99. package/dist/src/benchmark.report.js.map +1 -0
  100. package/dist/src/benchmark.report.spec.d.ts +1 -0
  101. package/dist/src/benchmark.report.spec.js +271 -0
  102. package/dist/src/benchmark.report.spec.js.map +1 -0
  103. package/dist/src/benchmark.runner.d.ts +74 -0
  104. package/dist/src/benchmark.runner.js +371 -0
  105. package/dist/src/benchmark.runner.js.map +1 -0
  106. package/dist/src/benchmark.runner.spec.d.ts +1 -0
  107. package/dist/src/benchmark.runner.spec.js +241 -0
  108. package/dist/src/benchmark.runner.spec.js.map +1 -0
  109. package/dist/src/benchmark.strategy.spec.d.ts +1 -0
  110. package/dist/src/benchmark.strategy.spec.js +66 -0
  111. package/dist/src/benchmark.strategy.spec.js.map +1 -0
  112. package/dist/src/cel.composition.integration.spec.d.ts +1 -0
  113. package/dist/src/cel.composition.integration.spec.js +110 -0
  114. package/dist/src/cel.composition.integration.spec.js.map +1 -0
  115. package/dist/src/cel.entity.d.ts +12 -0
  116. package/dist/src/cel.entity.js +98 -0
  117. package/dist/src/cel.entity.js.map +1 -0
  118. package/dist/src/cel.entity.spec.d.ts +1 -0
  119. package/dist/src/cel.entity.spec.js +82 -0
  120. package/dist/src/cel.entity.spec.js.map +1 -0
  121. package/dist/src/cel.evaluate.cli.spec.d.ts +1 -0
  122. package/dist/src/cel.evaluate.cli.spec.js +63 -0
  123. package/dist/src/cel.evaluate.cli.spec.js.map +1 -0
  124. package/dist/src/cel.evaluate.integration.spec.d.ts +1 -0
  125. package/dist/src/cel.evaluate.integration.spec.js +128 -0
  126. package/dist/src/cel.evaluate.integration.spec.js.map +1 -0
  127. package/dist/src/cel.integration.spec.js +227 -38
  128. package/dist/src/cel.integration.spec.js.map +1 -1
  129. package/dist/src/cel.result.ownership.spec.d.ts +1 -0
  130. package/dist/src/cel.result.ownership.spec.js +52 -0
  131. package/dist/src/cel.result.ownership.spec.js.map +1 -0
  132. package/dist/src/cel.shared.execution.d.ts +20 -0
  133. package/dist/src/cel.shared.execution.js +49 -0
  134. package/dist/src/cel.shared.execution.js.map +1 -0
  135. package/dist/src/cel.stats.d.ts +5 -0
  136. package/dist/src/cel.stats.js +73 -0
  137. package/dist/src/cel.stats.js.map +1 -0
  138. package/dist/src/cel.stats.spec.d.ts +1 -0
  139. package/dist/src/cel.stats.spec.js +85 -0
  140. package/dist/src/cel.stats.spec.js.map +1 -0
  141. package/dist/src/cli.integration.spec.js +14 -2
  142. package/dist/src/cli.integration.spec.js.map +1 -1
  143. package/dist/src/cli.js +8 -0
  144. package/dist/src/cli.js.map +1 -1
  145. package/dist/src/cli.spec.js +46 -6
  146. package/dist/src/cli.spec.js.map +1 -1
  147. package/dist/src/commands/benchmark.d.ts +3 -0
  148. package/dist/src/commands/benchmark.js +300 -0
  149. package/dist/src/commands/benchmark.js.map +1 -0
  150. package/dist/src/commands/cel.d.ts +1 -1
  151. package/dist/src/commands/cel.js +38 -5
  152. package/dist/src/commands/cel.js.map +1 -1
  153. package/dist/src/commands/characteristics.d.ts +3 -0
  154. package/dist/src/commands/characteristics.js +57 -0
  155. package/dist/src/commands/characteristics.js.map +1 -0
  156. package/dist/src/commands/characteristics.spec.d.ts +1 -0
  157. package/dist/src/commands/characteristics.spec.js +109 -0
  158. package/dist/src/commands/characteristics.spec.js.map +1 -0
  159. package/dist/src/commands/config.validate.js +8 -4
  160. package/dist/src/commands/config.validate.js.map +1 -1
  161. package/dist/src/commands/extract.d.ts +14 -0
  162. package/dist/src/commands/extract.js +85 -0
  163. package/dist/src/commands/extract.js.map +1 -0
  164. package/dist/src/commands/extract.spec.d.ts +1 -0
  165. package/dist/src/commands/extract.spec.js +179 -0
  166. package/dist/src/commands/extract.spec.js.map +1 -0
  167. package/dist/src/commands/periodicity.d.ts +3 -0
  168. package/dist/src/commands/periodicity.js +11 -0
  169. package/dist/src/commands/periodicity.js.map +1 -0
  170. package/dist/src/commands/validate.all.d.ts +7 -0
  171. package/dist/src/commands/validate.all.integration.spec.d.ts +1 -0
  172. package/dist/src/commands/validate.all.integration.spec.js +43 -0
  173. package/dist/src/commands/validate.all.integration.spec.js.map +1 -0
  174. package/dist/src/commands/validate.all.js +75 -0
  175. package/dist/src/commands/validate.all.js.map +1 -0
  176. package/dist/src/commands/validate.all.spec.d.ts +1 -0
  177. package/dist/src/commands/validate.all.spec.js +70 -0
  178. package/dist/src/commands/validate.all.spec.js.map +1 -0
  179. package/dist/src/context.d.ts +37 -6
  180. package/dist/src/context.js +574 -21
  181. package/dist/src/context.js.map +1 -1
  182. package/dist/src/indexed.accumulator.d.ts +18 -0
  183. package/dist/src/indexed.accumulator.js +102 -0
  184. package/dist/src/indexed.accumulator.js.map +1 -0
  185. package/dist/src/indexed.accumulator.spec.d.ts +1 -0
  186. package/dist/src/indexed.accumulator.spec.js +74 -0
  187. package/dist/src/indexed.accumulator.spec.js.map +1 -0
  188. package/package.json +24 -11
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PERIODIC_BENCHMARK = void 0;
4
+ exports.generatePeriodicBenchmarkProject = generatePeriodicBenchmarkProject;
5
+ const promises_1 = require("node:fs/promises");
6
+ const node_path_1 = require("node:path");
7
+ const cursor_loader_benchmark_1 = require("@cobol-ts/cursor-loader-benchmark");
8
+ const cel_graph_runtime_1 = require("@cobol-ts/cel-graph-runtime");
9
+ const cursor_loader_indexed_graph_state_1 = require("@cobol-ts/cursor-loader-indexed-graph-state");
10
+ const ring_buffer_1 = require("@cobol-ts/ring-buffer");
11
+ const yaml_jsyaml_1 = require("@cobol-ts/yaml-jsyaml");
12
+ exports.PERIODIC_BENCHMARK = 'graph-1000-periodic';
13
+ /** Seed completed histories rather than timing empty windows and fresh daily counters.
14
+ * This produces one sorted historical accumulator for each generated master entity.
15
+ */
16
+ async function generatePeriodicBenchmarkProject(base, records, force = false) {
17
+ if (!Number.isSafeInteger(records) || records < 1)
18
+ throw new RangeError('records must be positive');
19
+ const destination = (0, node_path_1.resolve)(base, exports.PERIODIC_BENCHMARK);
20
+ await (0, cursor_loader_benchmark_1.generateBenchmarkProject)(base, exports.PERIODIC_BENCHMARK, records, force);
21
+ const config = (0, node_path_1.join)(destination, '.cobolts');
22
+ const source = await (0, promises_1.readFile)((0, node_path_1.join)(config, 'graph.yaml'), 'utf8');
23
+ const graph = (0, cel_graph_runtime_1.parseAuthoringGraph)(source, yaml_jsyaml_1.jsYamlParser);
24
+ if ('errors' in graph)
25
+ throw new Error(graph.errors.join('\n'));
26
+ const canonical = (0, cel_graph_runtime_1.canonicaliseCelGraph)(graph.value);
27
+ if ('errors' in canonical)
28
+ throw new Error(canonical.errors.join('\n'));
29
+ const planned = (0, cel_graph_runtime_1.planCanonicalCelGraph)(canonical.value);
30
+ if ('errors' in planned)
31
+ throw new Error(planned.errors.join('\n'));
32
+ const nodes = planned.value.generations.flat();
33
+ if (nodes.length !== 1000)
34
+ throw new Error(`Expected 1000 benchmark nodes, received ${nodes.length}`);
35
+ const schema = (0, cursor_loader_indexed_graph_state_1.indexedGraphSchemaFromValueTypes)(nodes.map(node => ({ name: node.metadata.name, valueType: node.valueType })));
36
+ await (0, promises_1.writeFile)((0, node_path_1.join)(config, 'accumulator.yaml'), 'strategy: indexed\nfile: ../data/previous-state.igs\noptional: false\nremoved: reject\ncustomerId:\n field: recordId\n type: number\ninitial: {}\n');
37
+ // Fixed warm-up, without re-reading every record in a large historical fixture.
38
+ const original = await (0, promises_1.readFile)((0, node_path_1.join)(config, 'benchmark.yaml'), 'utf8');
39
+ await (0, promises_1.writeFile)((0, node_path_1.join)(config, 'benchmark.yaml'), original.replace('warmup: 100000', 'warmup: 1000'));
40
+ function* previous() {
41
+ for (let customer = 1; customer <= records; customer++) {
42
+ const state = (0, cursor_loader_indexed_graph_state_1.createIndexedGraphRecord)(schema.nodes.length);
43
+ state.customerId = BigInt(customer);
44
+ for (let i = 0; i < schema.nodes.length; i++) {
45
+ const field = schema.nodes[i];
46
+ if (field.type === 'rolling-window') {
47
+ const history = (0, ring_buffer_1.createRingBuffer)(6);
48
+ for (let month = 1; month <= 7; month++)
49
+ (0, ring_buffer_1.push)(history, month);
50
+ state.values[i] = history;
51
+ }
52
+ else if (/^node00\d\d$/.test(field.name)) {
53
+ // Completed daily counter carried over from the preceding daily run.
54
+ state.values[i] = 30 + (customer % 5);
55
+ }
56
+ else if (/^node02\d\d$/.test(field.name)) {
57
+ // 2+3+4+5+6+7, the six active months (1 has expired).
58
+ state.values[i] = 27;
59
+ }
60
+ else
61
+ state.values[i] = 0;
62
+ }
63
+ yield state;
64
+ }
65
+ }
66
+ await (0, cursor_loader_indexed_graph_state_1.writeIndexedGraphStateFile)((0, node_path_1.join)(destination, 'data', 'previous-state.igs'), schema, previous());
67
+ return destination;
68
+ }
69
+ //# sourceMappingURL=benchmark.periodic.fixture.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"benchmark.periodic.fixture.js","sourceRoot":"","sources":["../../src/benchmark.periodic.fixture.ts"],"names":[],"mappings":";;;AAaA,4EA2CC;AAxDD,+CAAoD;AACpD,yCAAuC;AACvC,+EAA0E;AAC1E,mEAA4G;AAC5G,mGAAkJ;AAClJ,uDAA4D;AAC5D,uDAAkD;AAErC,QAAA,kBAAkB,GAAG,qBAA8B,CAAA;AAEhE;;GAEG;AACI,KAAK,UAAU,gCAAgC,CAAC,IAAY,EAAE,OAAe,EAAE,KAAK,GAAG,KAAK;IAC/F,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,OAAO,CAAC,IAAI,OAAO,GAAG,CAAC;QAAE,MAAM,IAAI,UAAU,CAAC,0BAA0B,CAAC,CAAA;IACnG,MAAM,WAAW,GAAG,IAAA,mBAAO,EAAC,IAAI,EAAE,0BAAkB,CAAC,CAAA;IACrD,MAAM,IAAA,kDAAwB,EAAC,IAAI,EAAE,0BAAkB,EAAE,OAAO,EAAE,KAAK,CAAC,CAAA;IACxE,MAAM,MAAM,GAAG,IAAA,gBAAI,EAAC,WAAW,EAAE,UAAU,CAAC,CAAA;IAC5C,MA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AC,CAAC,CAAA;gBACnC,CAAC;qBAAM,IAAI,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;oBACzC,sDAAsD;oBACtD,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,GAAC,EAAE,CAAA;gBACtB,CAAC;;oBAAM,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,GAAC,CAAC,CAAA;YAC5B,CAAC;YACD,MAAM,KAAK,CAAA;QACf,CAAC;IACL,CAAC;IACD,MAAM,IAAA,8DAA0B,EAAC,IAAA,gBAAI,EAAC,WAAW,EAAC,MAAM,EAAC,oBAAoB,CAAC,EAAC,MAAM,EAAC,QAAQ,EAAE,CAAC,CAAA;IACjG,OAAO,WAAW,CAAA;AACtB,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,96 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const promises_1 = require("node:fs/promises");
4
+ const node_os_1 = require("node:os");
5
+ const node_path_1 = require("node:path");
6
+ const cursor_loader_benchmark_1 = require("@cobol-ts/cursor-loader-benchmark");
7
+ const cel_graph_runtime_1 = require("@cobol-ts/cel-graph-runtime");
8
+ const yaml_jsyaml_1 = require("@cobol-ts/yaml-jsyaml");
9
+ const cursor_loader_indexed_graph_state_1 = require("@cobol-ts/cursor-loader-indexed-graph-state");
10
+ const ring_buffer_1 = require("@cobol-ts/ring-buffer");
11
+ const benchmark_periodic_fixture_1 = require("./benchmark.periodic.fixture");
12
+ const cursor_loader_source_1 = require("@cobol-ts/cursor-loader-source");
13
+ it('generates exactly 100 daily scalars, 100 six-month windows, 100 sums and 700 other nodes', () => {
14
+ const parsed = (0, cel_graph_runtime_1.parseAuthoringGraph)((0, cursor_loader_benchmark_1.periodicGraphYaml)(), yaml_jsyaml_1.jsYamlParser);
15
+ if ('errors' in parsed)
16
+ throw new Error(parsed.errors.join('\n'));
17
+ const nodes = Object.entries(parsed.value);
18
+ expect(nodes.map(([name]) => name)).toEqual(Array.from({ length: 1000 }, (_, i) => `node${String(i).padStart(4, '0')}`));
19
+ expect(nodes.slice(0, 100).map(([name, node]) => {
20
+ if (node.type !== 'cel')
21
+ throw new Error(`Expected CEL node ${name}`);
22
+ return [node.metadata.periodicity, node.metadata.resetOn];
23
+ })).toEqual(Array.from({ length: 100 }, () => ['daily', 'monthly']));
24
+ expect(nodes.slice(100, 200).map(([name, node]) => {
25
+ if (node.type !== 'cel')
26
+ throw new Error(`Expected CEL node ${name}`);
27
+ return node.metadata.rollingWindow;
28
+ })).toEqual(Array.from({ length: 100 }, () => ({ periodicity: 'monthly', size: 6 })));
29
+ expect(nodes.slice(200, 300).map(([, node], i) => node.cel))
30
+ .toEqual(Array.from({ length: 100 }, (_, i) => `now.node${String(i + 100).padStart(4, '0')}.sum()`));
31
+ expect(nodes.slice(300, 370).map(([, node], i) => node.cel))
32
+ .toEqual(Array.from({ length: 70 }, (_, i) => `now.node${String(i + 200).padStart(4, '0')} + 1`));
33
+ expect(nodes.slice(370).map(([, node]) => node.cel))
34
+ .toEqual(Array.from({ length: 630 }, () => 'input.itemCount'));
35
+ const canonical = (0, cel_graph_runtime_1.canonicaliseCelGraph)(parsed.value);
36
+ if ('errors' in canonical)
37
+ throw new Error(canonical.errors.join('\n'));
38
+ expect(canonical.value.filter(n => n.valueType.kind === 'rolling-window').length).toBe(100);
39
+ expect(canonical.value.every(node => node.valueType.kind === 'rolling-window'
40
+ ? node.valueType.element.javascriptType === 'number'
41
+ : node.valueType.javascriptType === 'number')).toBe(true);
42
+ });
43
+ it('produces indexed historical records with six active months and the seventh expired', async () => {
44
+ const base = await (0, promises_1.mkdtemp)((0, node_path_1.join)((0, node_os_1.tmpdir)(), 'cobolts-periodic-'));
45
+ try {
46
+ const folder = await (0, benchmark_periodic_fixture_1.generatePeriodicBenchmarkProject)(base, 2);
47
+ const graph = await (0, promises_1.readFile)((0, node_path_1.join)(folder, '.cobolts', 'graph.yaml'), 'utf8');
48
+ expect(graph).toBe((0, cursor_loader_benchmark_1.periodicGraphYaml)().replace(/\binput\./g, 'input.records.'));
49
+ const configured = await (0, promises_1.readFile)((0, node_path_1.join)(folder, '.cobolts', 'files.yaml'), 'utf8');
50
+ expect(configured).toContain(' celIntegerRepresentation: number\n');
51
+ const input = await (0, cursor_loader_source_1.prepareConfiguredFileSource)({ configDirectory: (0, node_path_1.join)(folder, '.cobolts'), logicalName: 'records' });
52
+ const countAccess = input.access.compileScalar(['itemCount']);
53
+ if ('errors' in countAccess)
54
+ throw new Error(countAccess.errors.join('\n'));
55
+ expect(countAccess.value.integerStorage).toBe('number');
56
+ const accumulator = await (0, promises_1.readFile)((0, node_path_1.join)(folder, '.cobolts', 'accumulator.yaml'), 'utf8');
57
+ expect(accumulator).toBe('strategy: indexed\nfile: ../data/previous-state.igs\noptional: false\nremoved: reject\ncustomerId:\n field: recordId\n type: number\ninitial: {}\n');
58
+ const filename = (0, node_path_1.join)(folder, 'data', 'previous-state.igs');
59
+ expect((await (0, promises_1.stat)(filename)).size > 0).toBe(true);
60
+ const schema = await (0, cursor_loader_indexed_graph_state_1.readIndexedGraphStateFileSchema)(filename);
61
+ expect(schema.nodes.length).toBe(1000);
62
+ expect(schema.nodes.filter(node => node.type === 'rolling-window').length).toBe(100);
63
+ // Persisted descriptors describe physical int64 storage, not JS representation.
64
+ // Explicitly project the historical record into the benchmark's number-backed schema.
65
+ const parsed = (0, cel_graph_runtime_1.parseAuthoringGraph)(graph, yaml_jsyaml_1.jsYamlParser);
66
+ if ('errors' in parsed)
67
+ throw new Error(parsed.errors.join('\n'));
68
+ const canonical = (0, cel_graph_runtime_1.canonicaliseCelGraph)(parsed.value);
69
+ if ('errors' in canonical)
70
+ throw new Error(canonical.errors.join('\n'));
71
+ const planned = (0, cel_graph_runtime_1.planCanonicalCelGraph)(canonical.value);
72
+ if ('errors' in planned)
73
+ throw new Error(planned.errors.join('\n'));
74
+ const expectedSchema = (0, cursor_loader_indexed_graph_state_1.indexedGraphSchemaFromValueTypes)(planned.value.generations.flat()
75
+ .map(node => ({ name: node.metadata.name, valueType: node.valueType })));
76
+ expect(expectedSchema.nodes.every(node => node.javascriptType === 'number')).toBe(true);
77
+ let seen = 0;
78
+ for await (const state of (0, cursor_loader_indexed_graph_state_1.readIndexedGraphStateFile)(filename, { activeSchema: expectedSchema })) {
79
+ const record = state.representation;
80
+ seen++;
81
+ expect(record.customerId).toBe(BigInt(seen));
82
+ const byName = new Map(schema.nodes.map((node, i) => [node.name, i]));
83
+ expect(record.values[byName.get('node0000')]).toBe(30 + (seen % 5));
84
+ const history = record.values[byName.get('node0100')];
85
+ expect([history.size, (0, ring_buffer_1.length)(history), ...Array.from({ length: 6 }, (_, i) => (0, ring_buffer_1.get)(history, i)), (0, ring_buffer_1.expired)(history)])
86
+ .toEqual([6, 6, 2, 3, 4, 5, 6, 7, 1]);
87
+ expect(record.values[byName.get('node0200')]).toBe(27);
88
+ state.close();
89
+ }
90
+ expect(seen).toBe(2);
91
+ }
92
+ finally {
93
+ await (0, promises_1.rm)(base, { recursive: true, force: true });
94
+ }
95
+ });
96
+ //# sourceMappingURL=benchmark.periodic.fixture.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"benchmark.periodic.fixture.spec.js","sourceRoot":"","sources":["../../src/benchmark.periodic.fixture.spec.ts"],"names":[],"mappings":";;AAAA,+CAA4D;AAC5D,qCAA8B;AAC9B,yCAA8B;AAC9B,+EAAmE;AACnE,mEAA4G;AAC5G,uDAAkD;AAClD,mGAAsJ;AACtJ,uDAAwE;AACxE,6EAA6E;AAC7E,yEAA0E;AAE1E,EAAE,CAAC,0FAA0F,EAAC,GAAE,EAAE;IAC9F,MAAM,MAAM,GAAC,IAAA,uCAAmB,EAAC,IAAA,2CAAiB,GAAE,EAAC,0BAAY,CAAC,CAAA;IAClE,IAAG,QAAQ,IAAI,MAAM;QAAC,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,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A;YACjC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,UAAU,CAAE,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;YACvD,KAAK,CAAC,KAAK,EAAE,CAAA;QACjB,CAAC;QACD,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACxB,CAAC;YAAO,CAAC;QAAA,MAAM,IAAA,aAAE,EAAC,IAAI,EAAC,EAAC,SAAS,EAAC,IAAI,EAAC,KAAK,EAAC,IAAI,EAAC,CAAC,CAAA;IAAA,CAAC;AACxD,CAAC,CAAC,CAAA"}
@@ -0,0 +1,8 @@
1
+ export type BenchmarkProfileKind = 'cpu' | 'allocation';
2
+ /**
3
+ * Sample one selected measured pass, after compilation and warm-up.
4
+ * CPU profiles can be opened in Chrome DevTools Performance panel; allocation
5
+ * sampling profiles can be opened in the Memory panel. These are diagnostic
6
+ * runs: their timings should not be used for performance comparisons.
7
+ */
8
+ export declare function captureBenchmarkProfile<T>(kind: BenchmarkProfileKind, filename: string, action: () => Promise<T>): Promise<T>;
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.captureBenchmarkProfile = captureBenchmarkProfile;
4
+ const node_inspector_1 = require("node:inspector");
5
+ const promises_1 = require("node:fs/promises");
6
+ const node_path_1 = require("node:path");
7
+ /** Inspector messages used for profiling without Node startup flags or external packages. */
8
+ function post(session, method, params = {}) {
9
+ return new Promise((resolve, reject) => {
10
+ session.post(method, params, (error, response) => {
11
+ if (error)
12
+ reject(error);
13
+ else
14
+ resolve(response);
15
+ });
16
+ });
17
+ }
18
+ /**
19
+ * Sample one selected measured pass, after compilation and warm-up.
20
+ * CPU profiles can be opened in Chrome DevTools Performance panel; allocation
21
+ * sampling profiles can be opened in the Memory panel. These are diagnostic
22
+ * runs: their timings should not be used for performance comparisons.
23
+ */
24
+ async function captureBenchmarkProfile(kind, filename, action) {
25
+ const session = new node_inspector_1.Session();
26
+ session.connect();
27
+ const cpu = kind === 'cpu';
28
+ const stop = cpu ? 'Profiler.stop' : 'HeapProfiler.stopSampling';
29
+ let active = false;
30
+ try {
31
+ if (cpu) {
32
+ await post(session, 'Profiler.enable');
33
+ await post(session, 'Profiler.start');
34
+ }
35
+ else {
36
+ await post(session, 'HeapProfiler.enable');
37
+ await post(session, 'HeapProfiler.startSampling', {
38
+ samplingInterval: 32768,
39
+ // Include short-lived objects, not just those surviving GC.
40
+ includeObjectsCollectedByMinorGC: true,
41
+ includeObjectsCollectedByMajorGC: true
42
+ });
43
+ }
44
+ active = true;
45
+ const value = await action();
46
+ const result = await post(session, stop);
47
+ active = false;
48
+ await (0, promises_1.mkdir)((0, node_path_1.dirname)(filename), { recursive: true });
49
+ await (0, promises_1.writeFile)(filename, JSON.stringify(result.profile));
50
+ return value;
51
+ }
52
+ finally {
53
+ if (active) {
54
+ try {
55
+ await post(session, stop);
56
+ }
57
+ catch { /* Preserve the original execution error. */ }
58
+ }
59
+ session.disconnect();
60
+ }
61
+ }
62
+ //# sourceMappingURL=benchmark.profile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"benchmark.profile.js","sourceRoot":"","sources":["../../src/benchmark.profile.ts"],"names":[],"mappings":";;AAsBA,0DAoCC;AA1DD,mDAAsC;AACtC,+CAAiD;AACjD,yCAAiC;AAIjC,6FAA6F;AAC7F,SAAS,IAAI,CAAI,OAAgB,EAAE,MAAc,EAAE,SAAkC,EAAE;IACnF,OAAO,IAAI,OAAO,CAAI,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACtC,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE;YAC7C,IAAI,KAAK;gBAAE,MAAM,CAAC,KAAK,CAAC,CAAA;;gBACnB,OAAO,CAAC,QAAa,CAAC,CAAA;QAC/B,CAAC,CAAC,CAAA;IACN,CAAC,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P,IAAI,MAAM,EAAE,CAAC;YACT,IAAI,CAAC;gBAAA,MAAM,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;YAAA,CAAC;YAAC,MAAM,CAAC,CAAC,4CAA4C,CAAC,CAAC;QAC1F,CAAC;QACD,OAAO,CAAC,UAAU,EAAE,CAAA;IACxB,CAAC;AACL,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const promises_1 = require("node:fs/promises");
4
+ const node_os_1 = require("node:os");
5
+ const node_path_1 = require("node:path");
6
+ const benchmark_profile_1 = require("./benchmark.profile");
7
+ describe('benchmark inspector profiles', () => {
8
+ it('captures a CPU profile and returns the action result', async () => {
9
+ const root = await (0, promises_1.mkdtemp)((0, node_path_1.join)((0, node_os_1.tmpdir)(), 'cobolts-cpu-profile-'));
10
+ try {
11
+ const filename = (0, node_path_1.join)(root, 'nested', 'sample.cpuprofile');
12
+ const result = await (0, benchmark_profile_1.captureBenchmarkProfile)('cpu', filename, async () => {
13
+ let total = 0;
14
+ for (let i = 0; i < 500_000; i++)
15
+ total += i;
16
+ return total;
17
+ });
18
+ expect(result).toEqual(124999750000);
19
+ const profile = JSON.parse(await (0, promises_1.readFile)(filename, 'utf8'));
20
+ expect(Array.isArray(profile.nodes)).toEqual(true);
21
+ expect(Array.isArray(profile.samples)).toEqual(true);
22
+ }
23
+ finally {
24
+ await (0, promises_1.rm)(root, { recursive: true, force: true });
25
+ }
26
+ });
27
+ it('captures allocation sampling, including short-lived objects', async () => {
28
+ const root = await (0, promises_1.mkdtemp)((0, node_path_1.join)((0, node_os_1.tmpdir)(), 'cobolts-allocation-profile-'));
29
+ try {
30
+ const filename = (0, node_path_1.join)(root, 'sample.heapprofile');
31
+ const result = await (0, benchmark_profile_1.captureBenchmarkProfile)('allocation', filename, async () => {
32
+ let count = 0;
33
+ for (let batch = 0; batch < 20; batch++) {
34
+ const values = Array.from({ length: 10_000 }, (_, i) => ({ value: String(i) }));
35
+ count += values.length;
36
+ }
37
+ return count;
38
+ });
39
+ expect(result).toEqual(200000);
40
+ const profile = JSON.parse(await (0, promises_1.readFile)(filename, 'utf8'));
41
+ expect(profile.head.callFrame.functionName).toEqual('(root)');
42
+ expect(Array.isArray(profile.samples)).toEqual(true);
43
+ }
44
+ finally {
45
+ await (0, promises_1.rm)(root, { recursive: true, force: true });
46
+ }
47
+ });
48
+ it('releases the profiler when the action throws', async () => {
49
+ const root = await (0, promises_1.mkdtemp)((0, node_path_1.join)((0, node_os_1.tmpdir)(), 'cobolts-profile-failure-'));
50
+ try {
51
+ const broken = (0, node_path_1.join)(root, 'broken.cpuprofile');
52
+ await expect((0, benchmark_profile_1.captureBenchmarkProfile)('cpu', broken, async () => {
53
+ throw new Error('Evaluation failed');
54
+ })).rejects.toThrow('Evaluation failed');
55
+ const filename = (0, node_path_1.join)(root, 'working.cpuprofile');
56
+ await expect((0, benchmark_profile_1.captureBenchmarkProfile)('cpu', filename, async () => 12)).resolves.toEqual(12);
57
+ const profile = JSON.parse(await (0, promises_1.readFile)(filename, 'utf8'));
58
+ expect(Array.isArray(profile.nodes)).toEqual(true);
59
+ }
60
+ finally {
61
+ await (0, promises_1.rm)(root, { recursive: true, force: true });
62
+ }
63
+ });
64
+ });
65
+ //# sourceMappingURL=benchmark.profile.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"benchmark.profile.spec.js","sourceRoot":"","sources":["../../src/benchmark.profile.spec.ts"],"names":[],"mappings":";;AAAA,+CAAsD;AACtD,qCAA8B;AAC9B,yCAA8B;AAC9B,2DAA2D;AAE3D,QAAQ,CAAC,8BAA8B,EAAE,GAAG,EAAE;IAC1C,EAAE,CAAC,sDAAsD,EAAE,KAAK,IAAI,EAAE;QAClE,MAAM,IAAI,GAAG,MAAM,IAAA,kBAAO,EAAC,IAAA,gBAAI,EAAC,IAAA,gBAAM,GAAE,EAAE,sBAAsB,CAAC,CAAC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,0BAA0B,CAAC,CAAC,CAAA;QACtE,IAAI,CAAC;YACD,MAAM,MAAM,GAAG,IAAA,gBAAI,EAAC,IAAI,EAAE,mBAAmB,CAAC,CAAA;YAC9C,MAAM,MAAM,CAAC,IAAA,2CAAuB,EAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,EAAE;gBAC3D,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAA;YACxC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAA;YACxC,MAAM,QAAQ,GAAG,IAAA,gBAAI,EAAC,IAAI,EAAE,oBAAoB,CAAC,CAAA;YACjD,MAAM,MAAM,CAAC,IAAA,2CAAuB,EAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;YAC3F,MAAM,OAAO,GAAuB,IAAI,CAAC,KAAK,CAAC,MAAM,IAAA,mBAAQ,EAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAA;YAChF,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;QACtD,CAAC;gBAAS,CAAC;YACP,MAAM,IAAA,aAAE,EAAC,IAAI,EAAE,EAAC,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAC,CAAC,CAAA;QAClD,CAAC;IACL,CAAC,CAAC,CAAA;AACN,CAAC,CAAC,CAAA"}
@@ -0,0 +1,113 @@
1
+ import type { GarbageCollectionMeasurement } from './benchmark.gc';
2
+ /** Pure benchmark measurements and presentation. Times are elapsed milliseconds. */
3
+ export interface GraphTimingReport {
4
+ readonly sampleEvery: number;
5
+ readonly records: number;
6
+ readonly samples: number;
7
+ readonly resetNsPerSample: number;
8
+ readonly copyInNsPerSample: number;
9
+ readonly copyOutNsPerSample: number;
10
+ readonly generations: readonly {
11
+ readonly index: number;
12
+ readonly nodes: number;
13
+ readonly nsPerSample: number;
14
+ }[];
15
+ }
16
+ export interface TimedPass {
17
+ readonly records: number;
18
+ readonly totalMs: number;
19
+ readonly celMs: number;
20
+ readonly gc?: GarbageCollectionMeasurement;
21
+ readonly graphTiming?: GraphTimingReport;
22
+ /** Digest of customer-end states actually produced during a timed pass. */
23
+ readonly stateDigest?: string;
24
+ }
25
+ export interface BenchmarkGCMeasurement extends GarbageCollectionMeasurement {
26
+ readonly reclaimedBytesPerRecord: number;
27
+ }
28
+ export interface BenchmarkGCSummary {
29
+ readonly meanCollections: number;
30
+ readonly meanReclaimedBytes: number;
31
+ readonly meanReclaimedBytesPerRecord: number;
32
+ }
33
+ export interface BenchmarkMeasurement {
34
+ readonly records: number;
35
+ readonly elapsedMs: number;
36
+ readonly recordsPerSecond: number;
37
+ readonly nsPerRecord: number;
38
+ readonly gc?: BenchmarkGCMeasurement;
39
+ }
40
+ export interface BenchmarkPassReport {
41
+ readonly run: number;
42
+ readonly loader: BenchmarkMeasurement;
43
+ /** An opt-in pass that forces configured projected field access. */
44
+ readonly projection?: BenchmarkMeasurement;
45
+ readonly integrated?: BenchmarkMeasurement & {
46
+ readonly celNsPerRecord: number;
47
+ readonly nonCelNsPerRecord: number;
48
+ readonly graphTiming?: GraphTimingReport;
49
+ readonly stateDigest?: string;
50
+ };
51
+ }
52
+ export interface BenchmarkReport {
53
+ readonly project: string;
54
+ readonly node: string;
55
+ readonly v8: string;
56
+ readonly records: number;
57
+ readonly runs: number;
58
+ readonly warmupRecords: number;
59
+ readonly passes: readonly BenchmarkPassReport[];
60
+ readonly summary: {
61
+ readonly loader: BenchmarkMeasurement & {
62
+ readonly gcSummary?: BenchmarkGCSummary;
63
+ };
64
+ readonly projection?: BenchmarkMeasurement & {
65
+ readonly gcSummary?: BenchmarkGCSummary;
66
+ };
67
+ readonly integrated?: BenchmarkMeasurement & {
68
+ readonly gcSummary?: BenchmarkGCSummary;
69
+ readonly celMedianNsPerRecord: number;
70
+ readonly celMinNsPerRecord: number;
71
+ readonly celMaxNsPerRecord: number;
72
+ readonly nonCelNsPerRecord: number;
73
+ readonly throughputChangePercent: number;
74
+ };
75
+ };
76
+ }
77
+ /** Compute throughput from elapsed time; do not take a median of reciprocal throughput values. */
78
+ export declare function createBenchmarkReport(args: {
79
+ readonly project: string;
80
+ readonly node: string;
81
+ readonly v8: string;
82
+ readonly warmupRecords: number;
83
+ readonly loader: readonly TimedPass[];
84
+ readonly projection?: readonly TimedPass[];
85
+ readonly integrated?: readonly TimedPass[];
86
+ }): BenchmarkReport;
87
+ /** Text and JSON use the same measurements; these pieces can be emitted as runs finish. */
88
+ export declare function formatBenchmarkStart(args: {
89
+ readonly project: string;
90
+ readonly records: number;
91
+ readonly runs: number;
92
+ readonly node: string;
93
+ readonly v8: string;
94
+ readonly warmupRecords: number;
95
+ readonly withCel: boolean;
96
+ }): readonly string[];
97
+ export declare function formatBenchmarkPass(pass: BenchmarkPassReport): string;
98
+ /** Arithmetic means of displayed columns, distinct from the median summary. */
99
+ export declare function formatBenchmarkAverage(report: BenchmarkReport): readonly string[];
100
+ export declare function formatBenchmarkProjectionPass(pass: BenchmarkPassReport): string;
101
+ /** Throughput is the decision metric. Keep time per record only for the CEL diagnostic. */
102
+ export declare function formatBenchmarkSummary(report: BenchmarkReport): readonly string[];
103
+ /** Projection-only summary; separate from the complete benchmark throughput summary. */
104
+ export declare function formatBenchmarkProjectionSummary(report: BenchmarkReport): readonly string[];
105
+ export declare function formatBenchmarkReport(report: BenchmarkReport): readonly string[];
106
+ /** Cross-project comparison. Each row uses the same median measurements as its own summary. */
107
+ export declare function formatBenchmarkSuiteSummary(reports: readonly BenchmarkReport[]): readonly string[];
108
+ /** Stream one optional GC line immediately after each completed benchmark pass. */
109
+ export declare function formatBenchmarkGcPass(pass: BenchmarkPassReport): string;
110
+ export declare function formatBenchmarkProjectionGcPass(pass: BenchmarkPassReport): string;
111
+ export declare function formatBenchmarkProjectionGcSummary(report: BenchmarkReport): readonly string[];
112
+ /** Optional GC statistics are separate from the ordinary median throughput report. */
113
+ export declare function formatBenchmarkGcSummary(report: BenchmarkReport): readonly string[];