Skip to content

Commit 70d2e19

Browse files
committed
fix: fixed version output
1 parent b88a0ae commit 70d2e19

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

scripts/update-readme.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,12 @@ function generateBenchmarkSection(results) {
9797
let section = `### Latest Automated Benchmark Results\n\n`;
9898
section += `**Last Updated:** ${new Date().toISOString().split('T')[0]}\n\n`;
9999

100-
// Get all configuration names from the first result
101-
const firstResult = results[versions[0]];
102-
const configs = Object.keys(firstResult.results);
100+
// Get all configuration names from ALL results (union of all configs)
101+
const configsSet = new Set();
102+
for (const version of versions) {
103+
Object.keys(results[version].results).forEach(config => configsSet.add(config));
104+
}
105+
const configs = Array.from(configsSet).sort();
103106

104107
// Create a table for each configuration
105108
for (const config of configs) {
@@ -114,6 +117,9 @@ function generateBenchmarkSection(results) {
114117
section += `| ${version} | ${library} | ${result.setup_time.toFixed(1)} | ${result.insert_ops_per_sec.toLocaleString()} | ${result.select_ops_per_sec.toLocaleString()} | ${result.update_ops_per_sec.toLocaleString()} | ${result.delete_ops_per_sec.toLocaleString()} | ${result.db_size_mb} |\n`;
115118
} else if (result && result.error) {
116119
section += `| ${version} | - | ERROR | - | - | - | - | - |\n`;
120+
} else {
121+
// Config doesn't exist for this version - show N/A
122+
section += `| ${version} | - | - | - | - | - | - | - |\n`;
117123
}
118124
}
119125

0 commit comments

Comments
 (0)