agentdb 1.0.11 → 1.0.12

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/bin/agentdb.js CHANGED
@@ -428,14 +428,14 @@ async function runBenchmark(...args) {
428
428
  console.log(' npx agentdb benchmark [options]');
429
429
  console.log('');
430
430
  console.log('OPTIONS');
431
- console.log(' --quick, -q Run quick benchmark (500/1000 vectors)');
432
- console.log(' --vectors, -v <n> Custom batch size (default: 5000, quick: 1000)');
431
+ console.log(' --quick, -q Run quick benchmark (~5 seconds, 300 vectors)');
432
+ console.log(' --vectors, -v <n> Custom batch size (default: 1000, quick: 300)');
433
433
  console.log(' --help, -h Show this help');
434
434
  console.log('');
435
435
  console.log('EXAMPLES');
436
- console.log(' npx agentdb benchmark # Standard benchmark (5K vectors)');
437
- console.log(' npx agentdb benchmark --quick # Quick benchmark (1K vectors)');
438
- console.log(' npx agentdb benchmark -v 10000 # Custom 10K vectors');
436
+ console.log(' npx agentdb benchmark # Standard benchmark (1K vectors, ~20s)');
437
+ console.log(' npx agentdb benchmark --quick # Quick benchmark (300 vectors, ~5s)');
438
+ console.log(' npx agentdb benchmark -v 2000 # Custom 2K vectors (~60s)');
439
439
  console.log('');
440
440
  console.log('For comprehensive benchmarks with WASM comparison:');
441
441
  console.log(' git clone https://github.com/ruvnet/agentic-flow.git');
package/bin/benchmark.js CHANGED
@@ -45,14 +45,15 @@ async function runBenchmark(options = {}) {
45
45
  const { quick = false, vectors = null } = options;
46
46
 
47
47
  // Determine test sizes based on mode
48
+ // Note: HNSW index building is O(n log n), so batch sizes > 2000 can be slow
48
49
  const sizes = quick ? {
49
- single: 300,
50
- batch: 500,
50
+ single: 200,
51
+ batch: 300,
51
52
  queries: 10
52
53
  } : {
53
- single: 1000,
54
- batch: vectors || 5000,
55
- queries: 50
54
+ single: 500,
55
+ batch: vectors || 1000,
56
+ queries: 20
56
57
  };
57
58
 
58
59
  console.log('🚀 AgentDB Performance Benchmark\n');
@@ -87,12 +88,14 @@ async function runBenchmark(options = {}) {
87
88
 
88
89
  // Test 3: Batch Insert Performance
89
90
  console.log(`📊 Test 3: Batch Insert (${sizes.batch.toLocaleString()} vectors)`);
91
+ console.log(` ⏳ Generating ${sizes.batch.toLocaleString()} random vectors...`);
90
92
  const batchVectors = generateVectors(sizes.batch, 128);
93
+ console.log(` ⏳ Inserting batch (this may take a moment for HNSW indexing)...`);
91
94
  const batchStart = performance.now();
92
95
  db2.insertBatch(batchVectors);
93
96
  const batchDuration = performance.now() - batchStart;
94
97
  const batchOps = (sizes.batch / batchDuration) * 1000;
95
- console.log(` ✅ Duration: ${batchDuration.toFixed(2)}ms`);
98
+ console.log(` ✅ Duration: ${batchDuration.toFixed(2)}ms (includes HNSW index building)`);
96
99
  console.log(` ✅ Throughput: ${formatThroughput(batchOps)}\n`);
97
100
 
98
101
  // Test 4: Search Performance
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentdb",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "description": "Ultra-fast agent memory and vector database with ReasoningBank for AI agents. Built on SQLite with QUIC sync. From ruv.io - Advanced AI Infrastructure.",
5
5
  "keywords": [
6
6
  "agent",