Spaces:
Paused
Paused
| import { neo4jAdapter } from '../adapters/Neo4jAdapter.js'; | |
| import { hyperLog } from '../services/hyper-log.js'; | |
| async function pumpData() { | |
| console.log('π Starting DATA PUMP...'); | |
| // 1. Create Graph Nodes (Neo4j) | |
| try { | |
| console.log('π¦ Generating Graph Nodes...'); | |
| // Connection is handled automatically by executeQuery | |
| for (let i = 0; i < 30; i++) { | |
| await neo4jAdapter.executeQuery(` | |
| CREATE (n:TestNode { | |
| id: 'node-${Date.now()}-${i}', | |
| name: 'DataPoint ${i}', | |
| timestamp: datetime() | |
| }) | |
| `); | |
| } | |
| console.log('β Created 30 TestNodes'); | |
| } catch (err) { | |
| console.error('β Graph Error:', err); | |
| } | |
| // 2. Generate HyperLog Events | |
| console.log('π Generating HyperLog Events...'); | |
| const agents = ['System', 'Claude', 'Gemini', 'Watchdog']; | |
| const actions = ['SCAN', 'INDEX', 'OPTIMIZE', 'HEAL', 'QUERY']; | |
| for (let i = 0; i < 50; i++) { | |
| const agent = agents[Math.floor(Math.random() * agents.length)]; | |
| const action = actions[Math.floor(Math.random() * actions.length)]; | |
| await hyperLog.log( | |
| 'INSIGHT', | |
| agent, | |
| `${action} operation completed successfully on sector ${i}`, | |
| { iteration: i } | |
| ); | |
| } | |
| console.log('β Created 50 HyperLog events'); | |
| console.log('π DATA PUMP COMPLETE'); | |
| process.exit(0); | |
| } | |
| pumpData(); | |