@fjell/registry 4.4.7 → 4.4.9

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 +81 -4
  2. package/dist/Registry.cjs +20 -1
  3. package/dist/Registry.js +20 -1
  4. package/dist/RegistryHub.cjs +17 -1
  5. package/dist/RegistryHub.js +17 -1
  6. package/dist/index.cjs +35 -0
  7. package/dist/index.cjs.map +1 -1
  8. package/dist/types.d.ts +15 -0
  9. package/docs/README.md +74 -0
  10. package/docs/index.html +17 -0
  11. package/docs/memory-data/scaling-10-instances.json +206 -206
  12. package/docs/memory-data/scaling-100-instances.json +206 -206
  13. package/docs/memory-data/scaling-1000-instances.json +108 -108
  14. package/docs/memory-data/scaling-10000-instances.json +49 -49
  15. package/docs/memory-data/scaling-20-instances.json +208 -208
  16. package/docs/memory-data/scaling-200-instances.json +201 -201
  17. package/docs/memory-data/scaling-2000-instances.json +107 -107
  18. package/docs/memory-data/scaling-50-instances.json +206 -206
  19. package/docs/memory-data/scaling-500-instances.json +108 -108
  20. package/docs/memory-data/scaling-5000-instances.json +49 -49
  21. package/docs/memory-overhead.svg +17 -17
  22. package/docs/memory.md +111 -111
  23. package/docs/package.json +35 -0
  24. package/docs/public/README.md +623 -0
  25. package/docs/public/TIMING_NODE_OPTIMIZATION.md +207 -0
  26. package/docs/public/examples/coordinates-example.ts +253 -0
  27. package/docs/public/examples/multi-level-keys.ts +374 -0
  28. package/docs/public/examples/registry-hub-coordinates-example.ts +370 -0
  29. package/docs/public/examples/registry-hub-types.ts +437 -0
  30. package/docs/public/examples/simple-example.ts +250 -0
  31. package/docs/public/examples-README.md +222 -0
  32. package/docs/public/fjell-icon.svg +1 -0
  33. package/docs/public/icon.png +0 -0
  34. package/docs/public/icon2.png +0 -0
  35. package/docs/public/memory-overhead.svg +120 -0
  36. package/docs/public/memory.md +430 -0
  37. package/docs/public/pano.png +0 -0
  38. package/docs/public/pano2.png +0 -0
  39. package/docs/public/timing-range.svg +176 -0
  40. package/docs/public/timing.md +483 -0
  41. package/docs/src/App.css +1175 -0
  42. package/docs/src/App.test.tsx +50 -0
  43. package/docs/src/App.tsx +583 -0
  44. package/docs/src/index.css +40 -0
  45. package/docs/src/main.tsx +10 -0
  46. package/docs/src/test/setup.ts +1 -0
  47. package/docs/timing-range.svg +41 -41
  48. package/docs/timing.md +101 -101
  49. package/docs/tsconfig.node.json +13 -0
  50. package/docs/vitest.config.ts +14 -0
  51. package/examples/README.md +35 -0
  52. package/examples/coordinates-example.ts +253 -0
  53. package/examples/registry-hub-coordinates-example.ts +370 -0
  54. package/package.json +1 -1
@@ -0,0 +1,430 @@
1
+ # Registry Memory Consumption Analysis
2
+
3
+ > **Generated:** 2025-07-19T19:08:20.039Z
4
+ > **Version:** 4.4.5
5
+ > **Node.js:** v22.0.0
6
+ > **Test Environment:** darwin arm64
7
+
8
+ ## Executive Summary
9
+
10
+ This document provides a comprehensive analysis of memory efficiency for the Fjell Registry library infrastructure. The tests focus on measuring memory overhead per registry instance to ensure optimal memory scaling and efficiency in production environments.
11
+
12
+ "Memory efficiency per instance" refers to the average amount of memory used by each registry instance, helping identify how memory usage scales as the number of instances increases.
13
+
14
+ ## Memory Test Results
15
+
16
+ | Operation | Description | Memory Delta | Per Instance | Avg Time (ms) | Threshold | Status |
17
+ |-----------|-------------|--------------|--------------|---------------|-----------|--------|
18
+ | registryCreation | Memory overhead of creating a Registry instance | 66.21 kB | N/A | 0.000 | 83.01 kB | ✅ PASS |
19
+ | registryHubCreation | Memory overhead of creating a RegistryHub instance | 73.34 kB | N/A | 0.000 | 83.01 kB | ✅ PASS |
20
+ | coordinateCreation | Memory overhead of creating Coordinate instances | 112.55 kB | 1.13 kB | 0.001 | 146.48 kB | ✅ PASS |
21
+ | instanceCreation | Memory overhead of creating Instance objects | 158.27 kB | 1.58 kB | 0.001 | 244.14 kB | ✅ PASS |
22
+ | registryStorage | Memory growth when registering instances in registry | 310.70 kB | 3.11 kB | 0.005 | 390.63 kB | ✅ PASS |
23
+ | multiLevelTree | Memory overhead of multi-level instance tree structures | 212.92 kB | 4.26 kB | 0.005 | 585.94 kB | ✅ PASS |
24
+ | scopedInstances | Memory overhead of instances with multiple scopes | 315.40 kB | 3.15 kB | 0.003 | 610.35 kB | ✅ PASS |
25
+ | registryHubIntegration | Memory overhead of RegistryHub managing multiple registries | 281.44 kB | 2.81 kB | 0.012 | 2.29 MB | ✅ PASS |
26
+
27
+ ## Memory Efficiency Scaling Analysis (Statistical)
28
+
29
+ ### Per-Instance Memory Efficiency Results
30
+
31
+ | Instance Count | Iterations | Memory Per Instance (Avg ± StdDev) | Time (Avg ± StdDev) | Status |
32
+ |----------------|------------|-------------------------------------|---------------------|--------|
33
+ | 10 | 50 | 3.73 kB ± 5.09 kB | 0.04 ± 0.14 ms | ✅ PASS |
34
+ | 20 | 50 | 2.59 kB ± 1.67 kB | 0.09 ± 0.37 ms | ✅ PASS |
35
+ | 50 | 50 | 2.31 kB ± 1.73 kB | 0.15 ± 0.63 ms | ✅ PASS |
36
+ | 100 | 50 | 2.16 kB ± 1.75 kB | 0.31 ± 0.40 ms | ✅ PASS |
37
+ | 200 | 50 | 2.28 kB ± 2.28 kB | 0.72 ± 1.37 ms | ✅ PASS |
38
+ | 500 | 25 | 1.89 kB ± 1.35 kB | 3.35 ± 5.85 ms | ✅ PASS |
39
+ | 1,000 | 25 | 2.05 kB ± 1.72 kB | 2.23 ± 2.49 ms | ✅ PASS |
40
+ | 2,000 | 25 | 1.85 kB ± 1.52 kB | 5.32 ± 3.99 ms | ✅ PASS |
41
+ | 5,000 | 10 | 1.51 kB ± 905 B | 13.19 ± 6.27 ms | ✅ PASS |
42
+ | 10,000 | 10 | 1.76 kB ± 909 B | 18.37 ± 2.89 ms | ✅ PASS |
43
+
44
+ ### Detailed Statistical Analysis
45
+
46
+ #### 10 Instances (50 iterations)
47
+
48
+ **Memory Per Instance:**
49
+ - Average: 3.73 kB
50
+ - Range: 200 B - 27.14 kB
51
+ - Standard Deviation: 5.09 kB
52
+
53
+ **Creation Time:**
54
+ - Average: 0.04 ms
55
+ - Range: 0.01 - 1.03 ms
56
+ - Standard Deviation: 0.14 ms
57
+
58
+ #### 20 Instances (50 iterations)
59
+
60
+ **Memory Per Instance:**
61
+ - Average: 2.59 kB
62
+ - Range: 200 B - 8.97 kB
63
+ - Standard Deviation: 1.67 kB
64
+
65
+ **Creation Time:**
66
+ - Average: 0.09 ms
67
+ - Range: 0.02 - 2.65 ms
68
+ - Standard Deviation: 0.37 ms
69
+
70
+ #### 50 Instances (50 iterations)
71
+
72
+ **Memory Per Instance:**
73
+ - Average: 2.31 kB
74
+ - Range: 200 B - 9.98 kB
75
+ - Standard Deviation: 1.73 kB
76
+
77
+ **Creation Time:**
78
+ - Average: 0.15 ms
79
+ - Range: 0.05 - 4.55 ms
80
+ - Standard Deviation: 0.63 ms
81
+
82
+ #### 100 Instances (50 iterations)
83
+
84
+ **Memory Per Instance:**
85
+ - Average: 2.16 kB
86
+ - Range: 200 B - 10.54 kB
87
+ - Standard Deviation: 1.75 kB
88
+
89
+ **Creation Time:**
90
+ - Average: 0.31 ms
91
+ - Range: 0.08 - 3.04 ms
92
+ - Standard Deviation: 0.40 ms
93
+
94
+ #### 200 Instances (50 iterations)
95
+
96
+ **Memory Per Instance:**
97
+ - Average: 2.28 kB
98
+ - Range: 200 B - 11.64 kB
99
+ - Standard Deviation: 2.28 kB
100
+
101
+ **Creation Time:**
102
+ - Average: 0.72 ms
103
+ - Range: 0.17 - 7.75 ms
104
+ - Standard Deviation: 1.37 ms
105
+
106
+ #### 500 Instances (25 iterations)
107
+
108
+ **Memory Per Instance:**
109
+ - Average: 1.89 kB
110
+ - Range: 200 B - 7.61 kB
111
+ - Standard Deviation: 1.35 kB
112
+
113
+ **Creation Time:**
114
+ - Average: 3.35 ms
115
+ - Range: 0.41 - 26.01 ms
116
+ - Standard Deviation: 5.85 ms
117
+
118
+ #### 1,000 Instances (25 iterations)
119
+
120
+ **Memory Per Instance:**
121
+ - Average: 2.05 kB
122
+ - Range: 200 B - 7.63 kB
123
+ - Standard Deviation: 1.72 kB
124
+
125
+ **Creation Time:**
126
+ - Average: 2.23 ms
127
+ - Range: 0.84 - 8.48 ms
128
+ - Standard Deviation: 2.49 ms
129
+
130
+ #### 2,000 Instances (25 iterations)
131
+
132
+ **Memory Per Instance:**
133
+ - Average: 1.85 kB
134
+ - Range: 449 B - 6.68 kB
135
+ - Standard Deviation: 1.52 kB
136
+
137
+ **Creation Time:**
138
+ - Average: 5.32 ms
139
+ - Range: 1.86 - 14.81 ms
140
+ - Standard Deviation: 3.99 ms
141
+
142
+ #### 5,000 Instances (10 iterations)
143
+
144
+ **Memory Per Instance:**
145
+ - Average: 1.51 kB
146
+ - Range: 200 B - 3.86 kB
147
+ - Standard Deviation: 905 B
148
+
149
+ **Creation Time:**
150
+ - Average: 13.19 ms
151
+ - Range: 4.91 - 24.69 ms
152
+ - Standard Deviation: 6.27 ms
153
+
154
+ #### 10,000 Instances (10 iterations)
155
+
156
+ **Memory Per Instance:**
157
+ - Average: 1.76 kB
158
+ - Range: 1.28 kB - 3.58 kB
159
+ - Standard Deviation: 909 B
160
+
161
+ **Creation Time:**
162
+ - Average: 18.37 ms
163
+ - Range: 13.29 - 25.13 ms
164
+ - Standard Deviation: 2.89 ms
165
+
166
+
167
+ ### Memory Efficiency Pattern (Statistical Summary)
168
+
169
+ The following data shows per-instance memory efficiency with confidence intervals:
170
+
171
+ ```
172
+ Instance Count | Avg Per Instance | StdDev %
173
+ 10 | 3.73 kB | 136.7%
174
+ 20 | 2.59 kB | 64.5%
175
+ 50 | 2.31 kB | 74.7%
176
+ 100 | 2.16 kB | 81.0%
177
+ 200 | 2.28 kB | 99.8%
178
+ 500 | 1.89 kB | 71.3%
179
+ 1000 | 2.05 kB | 83.9%
180
+ 2000 | 1.85 kB | 82.1%
181
+ 5000 | 1.51 kB | 58.6%
182
+ 10000 | 1.76 kB | 50.5%
183
+ ```
184
+
185
+ ### Statistical Reliability
186
+
187
+ - **Sample Sizes**: 10: 50 iterations, 20: 50 iterations, 50: 50 iterations, 100: 50 iterations, 200: 50 iterations, 500: 25 iterations, 1000: 25 iterations, 2000: 25 iterations, 5000: 10 iterations, 10000: 10 iterations
188
+ - **Data Quality**: All measurements include statistical analysis with standard deviations
189
+ - **Outlier Detection**: Raw data files available in `./docs/memory-data/` for detailed analysis
190
+ - **Confidence**: Standard deviations indicate measurement reliability and consistency
191
+
192
+ ### Scaling Characteristics (Statistical)
193
+
194
+ - **Per-Instance Memory Change**: -30.2% (2.16 kB → 1.51 kB)
195
+ - **Memory Efficiency**: Needs optimization
196
+ - **Per-Instance Consistency**: Excellent (< 1KB variation)
197
+ - **Statistical Confidence**: High (multiple iterations with standard deviation analysis)
198
+
199
+ ## Detailed Memory Analysis
200
+
201
+ ### registryCreation
202
+
203
+ **Description:** Memory overhead of creating a Registry instance
204
+ **Iterations:** 100
205
+ **Total Memory Delta:** 66.21 kB
206
+ **Memory Per Instance:** N/A
207
+ **Average Time:** 0.000 ms
208
+
209
+ **Memory Breakdown:**
210
+ - Heap Used: 66.21 kB
211
+ - Heap Total: 0 B
212
+ - External: 40 B
213
+ - RSS: 0 B
214
+
215
+ **Memory Threshold:** 83.01 kB
216
+ **Time Threshold:** 1 ms
217
+ **Status:** ✅ PASS
218
+
219
+ ### registryHubCreation
220
+
221
+ **Description:** Memory overhead of creating a RegistryHub instance
222
+ **Iterations:** 100
223
+ **Total Memory Delta:** 73.34 kB
224
+ **Memory Per Instance:** N/A
225
+ **Average Time:** 0.000 ms
226
+
227
+ **Memory Breakdown:**
228
+ - Heap Used: 73.34 kB
229
+ - Heap Total: 0 B
230
+ - External: 0 B
231
+ - RSS: 0 B
232
+
233
+ **Memory Threshold:** 83.01 kB
234
+ **Time Threshold:** 1.5 ms
235
+ **Status:** ✅ PASS
236
+
237
+ ### coordinateCreation
238
+
239
+ **Description:** Memory overhead of creating Coordinate instances
240
+ **Iterations:** 100
241
+ **Total Memory Delta:** 112.55 kB
242
+ **Memory Per Instance:** 1.13 kB
243
+ **Average Time:** 0.001 ms
244
+
245
+ **Memory Breakdown:**
246
+ - Heap Used: 112.55 kB
247
+ - Heap Total: 0 B
248
+ - External: 0 B
249
+ - RSS: 0 B
250
+
251
+ **Memory Threshold:** 146.48 kB
252
+ **Time Threshold:** 0.5 ms
253
+ **Status:** ✅ PASS
254
+
255
+ ### instanceCreation
256
+
257
+ **Description:** Memory overhead of creating Instance objects
258
+ **Iterations:** 100
259
+ **Total Memory Delta:** 158.27 kB
260
+ **Memory Per Instance:** 1.58 kB
261
+ **Average Time:** 0.001 ms
262
+
263
+ **Memory Breakdown:**
264
+ - Heap Used: 158.27 kB
265
+ - Heap Total: 0 B
266
+ - External: 0 B
267
+ - RSS: 0 B
268
+
269
+ **Memory Threshold:** 244.14 kB
270
+ **Time Threshold:** 1 ms
271
+ **Status:** ✅ PASS
272
+
273
+ ### registryStorage
274
+
275
+ **Description:** Memory growth when registering instances in registry
276
+ **Iterations:** 100
277
+ **Total Memory Delta:** 310.70 kB
278
+ **Memory Per Instance:** 3.11 kB
279
+ **Average Time:** 0.005 ms
280
+
281
+ **Memory Breakdown:**
282
+ - Heap Used: 310.70 kB
283
+ - Heap Total: 0 B
284
+ - External: 0 B
285
+ - RSS: 0 B
286
+
287
+ **Memory Threshold:** 390.63 kB
288
+ **Time Threshold:** 1.5 ms
289
+ **Status:** ✅ PASS
290
+
291
+ ### multiLevelTree
292
+
293
+ **Description:** Memory overhead of multi-level instance tree structures
294
+ **Iterations:** 50
295
+ **Total Memory Delta:** 212.92 kB
296
+ **Memory Per Instance:** 4.26 kB
297
+ **Average Time:** 0.005 ms
298
+
299
+ **Memory Breakdown:**
300
+ - Heap Used: 212.92 kB
301
+ - Heap Total: 0 B
302
+ - External: 0 B
303
+ - RSS: 0 B
304
+
305
+ **Memory Threshold:** 585.94 kB
306
+ **Time Threshold:** 2 ms
307
+ **Status:** ✅ PASS
308
+
309
+ ### scopedInstances
310
+
311
+ **Description:** Memory overhead of instances with multiple scopes
312
+ **Iterations:** 100
313
+ **Total Memory Delta:** 315.40 kB
314
+ **Memory Per Instance:** 3.15 kB
315
+ **Average Time:** 0.003 ms
316
+
317
+ **Memory Breakdown:**
318
+ - Heap Used: 315.40 kB
319
+ - Heap Total: 0 B
320
+ - External: 0 B
321
+ - RSS: 16.00 kB
322
+
323
+ **Memory Threshold:** 610.35 kB
324
+ **Time Threshold:** 2 ms
325
+ **Status:** ✅ PASS
326
+
327
+ ### registryHubIntegration
328
+
329
+ **Description:** Memory overhead of RegistryHub managing multiple registries
330
+ **Iterations:** 20
331
+ **Total Memory Delta:** 281.44 kB
332
+ **Memory Per Instance:** 2.81 kB
333
+ **Average Time:** 0.012 ms
334
+
335
+ **Memory Breakdown:**
336
+ - Heap Used: 281.44 kB
337
+ - Heap Total: 0 B
338
+ - External: 0 B
339
+ - RSS: 0 B
340
+
341
+ **Memory Threshold:** 2.29 MB
342
+ **Time Threshold:** 5 ms
343
+ **Status:** ✅ PASS
344
+
345
+ ## Memory Constraints
346
+
347
+ The following memory constraints are enforced to ensure optimal memory usage:
348
+
349
+ ### Infrastructure Overhead
350
+ - **Registry Creation**: ≤ 83.01 kB
351
+ - **Registry Hub Creation**: ≤ 83.01 kB
352
+ - **Maximum Registry Overhead**: ≤ 117.19 kB
353
+
354
+ ### Per-Instance Overhead
355
+ - **Instance Creation**: ≤ 2.44 kB per instance
356
+ - **Coordinate Creation**: ≤ 1.46 kB per coordinate
357
+ - **Instance Tree Node**: ≤ 3.91 kB per tree node
358
+ - **Maximum Memory Per Instance**: ≤ 4.88 kB
359
+
360
+ ### Memory Efficiency Analysis
361
+
362
+ The memory efficiency analysis focuses on per-instance memory overhead and how it scales with the number of instances.
363
+
364
+ - **Registry Overhead Efficiency**: 20.2% under constraint limit
365
+ - **Per-Instance Efficiency**: 67.6% under constraint limit
366
+
367
+ ## Performance Characteristics
368
+
369
+ ### Memory Efficiency Scaling
370
+ - **Per-Instance Consistency**: Memory overhead per instance remains relatively constant as instance count increases
371
+ - **Statistical Validation**: Multiple iterations ensure reliable measurements of per-instance efficiency
372
+ - **Low Variance**: Small standard deviations indicate consistent per-instance memory usage
373
+ - **Predictable Efficiency**: Memory efficiency per instance is predictable and optimized
374
+
375
+ ### Optimization Features
376
+ - **Efficient Data Structures**: Uses optimized tree structures for instance storage
377
+ - **Minimal Overhead**: Core registry infrastructure has very low memory footprint
378
+ - **Consistent Performance**: Statistical analysis shows reliable memory patterns
379
+
380
+ ## Data Files
381
+
382
+ Raw measurement data is available in the following files:
383
+ - `./docs/memory-data/scaling-10-instances.json`
384
+ - `./docs/memory-data/scaling-20-instances.json`
385
+ - `./docs/memory-data/scaling-50-instances.json`
386
+ - `./docs/memory-data/scaling-100-instances.json`
387
+ - `./docs/memory-data/scaling-200-instances.json`
388
+ - `./docs/memory-data/scaling-500-instances.json`
389
+ - `./docs/memory-data/scaling-1000-instances.json`
390
+ - `./docs/memory-data/scaling-2000-instances.json`
391
+ - `./docs/memory-data/scaling-5000-instances.json`
392
+ - `./docs/memory-data/scaling-10000-instances.json`
393
+
394
+ These files contain all individual measurements, allowing for detailed statistical analysis and trend identification.
395
+
396
+ ## Recommendations
397
+
398
+ ### Memory Management
399
+ 1. **Monitor Instance Count**: Keep track of total instances across all registries
400
+ 2. **Statistical Analysis**: Use the statistical data to understand memory variance
401
+ 3. **Trend Analysis**: Review raw data files to identify memory usage patterns
402
+ 4. **Cleanup**: Ensure proper cleanup of unused instances and registries
403
+
404
+ ### Performance Optimization
405
+ 1. **Batch Operations**: Create instances in batches when possible
406
+ 2. **Registry Reuse**: Reuse registries instead of creating new ones frequently
407
+ 3. **Statistical Monitoring**: Use the statistical baselines to detect anomalies
408
+ 4. **Constraint Monitoring**: Regularly run memory tests to ensure constraints are met
409
+
410
+ ## Troubleshooting
411
+
412
+ ### Memory Issues
413
+ If memory tests fail, consider:
414
+
415
+ 1. **Statistical Significance**: Check if failures are consistent across multiple iterations
416
+ 2. **Variance Analysis**: High standard deviations may indicate unstable conditions
417
+ 3. **Raw Data Review**: Examine individual measurements in data files for patterns
418
+ 4. **System Resources**: Ensure adequate system memory is available during testing
419
+
420
+ ### Constraint Violations
421
+ If memory constraints are exceeded:
422
+
423
+ 1. **Statistical Confidence**: Verify violations are consistent across iterations
424
+ 2. **Trend Analysis**: Use historical data to identify if this is a regression
425
+ 3. **Outlier Investigation**: Check raw measurements for outliers affecting averages
426
+ 4. **Update Thresholds**: Consider updating constraints based on statistical analysis
427
+
428
+ ---
429
+
430
+ *This document is automatically generated during memory testing and includes statistical analysis of multiple iterations. Raw data files are saved for detailed analysis.*
Binary file
Binary file
@@ -0,0 +1,176 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="1200" height="800" xmlns="http://www.w3.org/2000/svg">
3
+ <style>
4
+ .axis { stroke: #333; stroke-width: 1; }
5
+ .grid { stroke: #ddd; stroke-width: 0.5; }
6
+ .label { font-family: Arial, sans-serif; font-size: 14px; fill: #333; }
7
+ .title { font-family: Arial, sans-serif; font-size: 16px; font-weight: bold; fill: #333; }
8
+ .subtitle { font-family: Arial, sans-serif; font-size: 12px; fill: #666; }
9
+ .register-mean { stroke: #e74c3c; stroke-width: 3; fill: none; }
10
+ .lookup-mean { stroke: #3498db; stroke-width: 3; fill: none; }
11
+ .register-band { fill: rgba(231, 76, 60, 0.2); stroke: #e74c3c; stroke-width: 1; }
12
+ .lookup-band { fill: rgba(52, 152, 219, 0.2); stroke: #3498db; stroke-width: 1; }
13
+ .register-dot { fill: #e74c3c; }
14
+ .lookup-dot { fill: #3498db; }
15
+ .legend { font-family: Arial, sans-serif; font-size: 12px; fill: #333; }
16
+ .axis-title { font-family: Arial, sans-serif; font-size: 16px; font-weight: bold; fill: #333; }
17
+ .metadata-title { font-family: Arial, sans-serif; font-size: 14px; font-weight: bold; fill: #333; }
18
+ .metadata-section { font-family: Arial, sans-serif; font-size: 14px; font-weight: bold; fill: #444; }
19
+ .metadata-label { font-family: Arial, sans-serif; font-size: 10px; fill: #666; }
20
+ .metadata-value { font-family: Arial, sans-serif; font-size: 10px; fill: #333; }
21
+ </style>
22
+
23
+ <!-- Background -->
24
+ <rect width="1200" height="800" fill="white"/>
25
+
26
+ <!-- Title -->
27
+ <text x="600" y="25" text-anchor="middle" class="title">Timing of Common Registry Operations</text>
28
+ <text x="600" y="45" text-anchor="middle" class="subtitle">Performance measurements across varying tree sizes</text>
29
+
30
+ <!-- Plot area -->
31
+ <g transform="translate(110,60)">
32
+
33
+ <!-- Grid lines (logarithmic scale) -->
34
+ <line x1="0" y1="405.47941100296094" x2="1015" y2="405.47941100296094" class="grid"/>
35
+ <text x="-10" y="409.47941100296094" text-anchor="end" class="label">0.05µs</text>
36
+ <line x1="0" y1="344.44867833493345" x2="1015" y2="344.44867833493345" class="grid"/>
37
+ <text x="-10" y="348.44867833493345" text-anchor="end" class="label">0.10µs</text>
38
+ <line x1="0" y1="283.41794566690595" x2="1015" y2="283.41794566690595" class="grid"/>
39
+ <text x="-10" y="287.41794566690595" text-anchor="end" class="label">0.20µs</text>
40
+ <line x1="0" y1="202.7397055014805" x2="1015" y2="202.7397055014805" class="grid"/>
41
+ <text x="-10" y="206.7397055014805" text-anchor="end" class="label">0.50µs</text>
42
+ <line x1="0" y1="141.708972833453" x2="1015" y2="141.708972833453" class="grid"/>
43
+ <text x="-10" y="145.708972833453" text-anchor="end" class="label">1.0µs</text>
44
+ <line x1="0" y1="80.6782401654255" x2="1015" y2="80.6782401654255" class="grid"/>
45
+ <text x="-10" y="84.6782401654255" text-anchor="end" class="label">2.0µs</text>
46
+ <line x1="0" y1="0" x2="1015" y2="0" class="grid"/>
47
+ <text x="-10" y="4" text-anchor="end" class="label">5.0µs</text>
48
+ <line x1="0" y1="0" x2="0" y2="460" class="grid"/>
49
+ <text x="0" y="480" text-anchor="middle" class="label">10</text>
50
+ <line x1="76.38636139973525" y1="0" x2="76.38636139973525" y2="460" class="grid"/>
51
+ <text x="76.38636139973525" y="480" text-anchor="middle" class="label">20</text>
52
+ <line x1="177.36363860026475" y1="0" x2="177.36363860026475" y2="460" class="grid"/>
53
+ <text x="177.36363860026475" y="480" text-anchor="middle" class="label">50</text>
54
+ <line x1="253.75" y1="0" x2="253.75" y2="460" class="grid"/>
55
+ <text x="253.75" y="480" text-anchor="middle" class="label">100</text>
56
+ <line x1="330.1363613997352" y1="0" x2="330.1363613997352" y2="460" class="grid"/>
57
+ <text x="330.1363613997352" y="480" text-anchor="middle" class="label">200</text>
58
+ <line x1="431.1136386002648" y1="0" x2="431.1136386002648" y2="460" class="grid"/>
59
+ <text x="431.1136386002648" y="480" text-anchor="middle" class="label">500</text>
60
+ <line x1="507.5" y1="0" x2="507.5" y2="460" class="grid"/>
61
+ <text x="507.5" y="480" text-anchor="middle" class="label">1k</text>
62
+ <line x1="583.8863613997353" y1="0" x2="583.8863613997353" y2="460" class="grid"/>
63
+ <text x="583.8863613997353" y="480" text-anchor="middle" class="label">2k</text>
64
+ <line x1="684.8636386002647" y1="0" x2="684.8636386002647" y2="460" class="grid"/>
65
+ <text x="684.8636386002647" y="480" text-anchor="middle" class="label">5k</text>
66
+ <line x1="761.25" y1="0" x2="761.25" y2="460" class="grid"/>
67
+ <text x="761.25" y="480" text-anchor="middle" class="label">10k</text>
68
+ <line x1="837.6363613997353" y1="0" x2="837.6363613997353" y2="460" class="grid"/>
69
+ <text x="837.6363613997353" y="480" text-anchor="middle" class="label">20k</text>
70
+ <line x1="938.6136386002647" y1="0" x2="938.6136386002647" y2="460" class="grid"/>
71
+ <text x="938.6136386002647" y="480" text-anchor="middle" class="label">50k</text>
72
+ <line x1="1015" y1="0" x2="1015" y2="460" class="grid"/>
73
+ <text x="1015" y="480" text-anchor="middle" class="label">100k</text>
74
+ <!-- Y-axis -->
75
+ <line x1="0" y1="0" x2="0" y2="460" class="axis"/>
76
+
77
+ <!-- X-axis -->
78
+ <line x1="0" y1="460" x2="1015" y2="460" class="axis"/>
79
+
80
+ <!-- Axis labels -->
81
+ <text x="507.5" y="510" text-anchor="middle" class="axis-title">Tree Size (items) - Log Scale</text>
82
+ <text transform="rotate(-90,-70,230)" x="-70" y="230" text-anchor="middle" class="axis-title">Execution Time (µs)</text>
83
+ <path d="M 0 148.74050590256667 L 76.38636139973525 148.7524277923311 L 177.36363860026475 148.44013071796422 L 253.75 163.96828165051454 L 330.1363613997352 162.08556246017355 L 431.1136386002648 172.30055096042298 L 507.5 164.83245476448178 L 583.8863613997353 182.97393995516205 L 684.8636386002647 169.94194464665668 L 761.25 151.0989993965061 L 837.6363613997353 160.0780931612813 L 938.6136386002647 148.48776057676235 L 1015 120.43534569475918" class="register-mean"/>
84
+ <path d="M 0 391.3646719514693 L 76.38636139973525 388.54139718542586 L 177.36363860026475 389.0557369024966 L 253.75 374.3747740786199 L 330.1363613997352 398.9692673319725 L 431.1136386002648 360.0500990825511 L 507.5 360.0275016662577 L 583.8863613997353 305.0657993375811 L 684.8636386002647 300.3208350816295 L 761.25 264.9832596121842 L 837.6363613997353 268.5823457977558 L 938.6136386002647 288.5555639615857 L 1015 247.60931540724576" class="lookup-mean"/>
85
+ <circle cx="0" cy="148.74050590256667" r="4" class="register-dot"/>
86
+ <circle cx="76.38636139973525" cy="148.7524277923311" r="4" class="register-dot"/>
87
+ <circle cx="177.36363860026475" cy="148.44013071796422" r="4" class="register-dot"/>
88
+ <circle cx="253.75" cy="163.96828165051454" r="4" class="register-dot"/>
89
+ <circle cx="330.1363613997352" cy="162.08556246017355" r="4" class="register-dot"/>
90
+ <circle cx="431.1136386002648" cy="172.30055096042298" r="4" class="register-dot"/>
91
+ <circle cx="507.5" cy="164.83245476448178" r="4" class="register-dot"/>
92
+ <circle cx="583.8863613997353" cy="182.97393995516205" r="4" class="register-dot"/>
93
+ <circle cx="684.8636386002647" cy="169.94194464665668" r="4" class="register-dot"/>
94
+ <circle cx="761.25" cy="151.0989993965061" r="4" class="register-dot"/>
95
+ <circle cx="837.6363613997353" cy="160.0780931612813" r="4" class="register-dot"/>
96
+ <circle cx="938.6136386002647" cy="148.48776057676235" r="4" class="register-dot"/>
97
+ <circle cx="1015" cy="120.43534569475918" r="4" class="register-dot"/>
98
+ <circle cx="0" cy="391.3646719514693" r="4" class="lookup-dot"/>
99
+ <circle cx="76.38636139973525" cy="388.54139718542586" r="4" class="lookup-dot"/>
100
+ <circle cx="177.36363860026475" cy="389.0557369024966" r="4" class="lookup-dot"/>
101
+ <circle cx="253.75" cy="374.3747740786199" r="4" class="lookup-dot"/>
102
+ <circle cx="330.1363613997352" cy="398.9692673319725" r="4" class="lookup-dot"/>
103
+ <circle cx="431.1136386002648" cy="360.0500990825511" r="4" class="lookup-dot"/>
104
+ <circle cx="507.5" cy="360.0275016662577" r="4" class="lookup-dot"/>
105
+ <circle cx="583.8863613997353" cy="305.0657993375811" r="4" class="lookup-dot"/>
106
+ <circle cx="684.8636386002647" cy="300.3208350816295" r="4" class="lookup-dot"/>
107
+ <circle cx="761.25" cy="264.9832596121842" r="4" class="lookup-dot"/>
108
+ <circle cx="837.6363613997353" cy="268.5823457977558" r="4" class="lookup-dot"/>
109
+ <circle cx="938.6136386002647" cy="288.5555639615857" r="4" class="lookup-dot"/>
110
+ <circle cx="1015" cy="247.60931540724576" r="4" class="lookup-dot"/>
111
+ <!-- Legend -->
112
+ <g transform="translate(20, 20)">
113
+ <rect x="0" y="0" width="190" height="80" fill="white" stroke="#ccc" stroke-width="1"/>
114
+
115
+ <!-- Register Instance Legend -->
116
+ <text x="10" y="20" class="legend" font-weight="bold">Register Instance</text>
117
+ <line x1="10" y1="30" x2="40" y2="30" class="register-mean"/>
118
+ <circle cx="25" cy="30" r="3" class="register-dot"/>
119
+ <text x="45" y="34" class="legend">Average Timing</text>
120
+
121
+ <!-- Lookup Instance Legend -->
122
+ <text x="10" y="55" class="legend" font-weight="bold">Lookup Instance</text>
123
+ <line x1="10" y1="65" x2="40" y2="65" class="lookup-mean"/>
124
+ <circle cx="25" cy="65" r="3" class="lookup-dot"/>
125
+ <text x="45" y="69" class="legend">Average Timing</text>
126
+ </g>
127
+
128
+ </g>
129
+
130
+ <!-- Test Metadata Section -->
131
+ <g transform="translate(50, 620)">
132
+ <!-- Left Column: System Information -->
133
+ <g transform="translate(20, 20)">
134
+ <text x="0" y="0" class="metadata-section">System Information</text>
135
+
136
+ <text x="0" y="25" class="metadata-label">Test Date:</text>
137
+ <text x="150" y="25" class="metadata-value">2025-07-21</text>
138
+
139
+ <text x="0" y="45" class="metadata-label">Package Version:</text>
140
+ <text x="150" y="45" class="metadata-value">@fjell/registry v4.4.5</text>
141
+
142
+ <text x="0" y="65" class="metadata-label">Node.js Version:</text>
143
+ <text x="150" y="65" class="metadata-value">v22.0.0 (darwin arm64)</text>
144
+
145
+ <text x="0" y="85" class="metadata-label">Platform:</text>
146
+ <text x="150" y="85" class="metadata-value">darwin arm64</text>
147
+
148
+ <text x="0" y="105" class="metadata-label">Compiler:</text>
149
+ <text x="150" y="105" class="metadata-value">TypeScript + Vite</text>
150
+ </g>
151
+
152
+ <!-- Center Column: Test Configuration -->
153
+ <g transform="translate(330, 20)">
154
+ <text x="0" y="0" class="metadata-section">Test Configuration</text>
155
+
156
+ <text x="0" y="25" class="metadata-label">Test Rounds:</text>
157
+ <text x="120" y="25" class="metadata-value">100 per tree size</text>
158
+
159
+ <text x="0" y="45" class="metadata-label">Iterations per Round:</text>
160
+ <text x="120" y="45" class="metadata-value">200 operations</text>
161
+
162
+ <text x="0" y="65" class="metadata-label">Total Measurements:</text>
163
+ <text x="120" y="65" class="metadata-value">20,000 per data point</text>
164
+ </g>
165
+
166
+ <!-- Right Column: Test Notes -->
167
+ <g transform="translate(600, 20)">
168
+ <text x="0" y="0" class="metadata-section">Test Notes</text>
169
+ <text x="0" y="25" class="metadata-label">• Performance measurements use Node.js performance.now() with microsecond precision</text>
170
+ <text x="0" y="42" class="metadata-label">• Each test includes warm-up iterations to minimize JIT compilation effects</text>
171
+ <text x="0" y="59" class="metadata-label">• Logging is mocked during timing tests to eliminate I/O overhead</text>
172
+ <text x="0" y="76" class="metadata-label">• Tests verify both mean performance and consistency (low standard deviation)</text>
173
+ <text x="0" y="93" class="metadata-label">• Statistical analysis ensures reliable performance measurements across all tree sizes</text>
174
+ </g>
175
+ </g>
176
+ </svg>