直方图导出格式兼容性
🌐 Histogram export format compatibility
perf_hooks.importHistogram() 接受 histogram.export() 生成的每个格式版本:
- 版本 1 是由 Node.js v26.9.0 生成的。带有版本 1 键的数据,或者没有版本键的数据,将按原始语义导入:上述未列出的键会被拒绝。
- 版本2的布局和版本1一样。不被识别的键会被忽略,所以Node.js的后续版本可以向版本2的数据添加字段而不改变版本号,而且数据仍然可以导入。
任何其他版本的数据都会被拒绝。
🌐 Data with any other version is rejected.
当总数、最小值或最大值缺失时,它会根据桶计数来推算。已有的总数必须与桶计数相匹配。
🌐 When the total count, min, or max value is absent, it is derived from the bucket counts. A total count that is present must match the bucket counts.