Objective
Implement PROFILE and EXPLAIN execution modes for NeuG to help users analyze query execution performance and understand query execution plans.
Requirements
- PROFILE Mode: Execute query and collect execution statistics (elapsed time, output rows) for each operator in the pipeline
- EXPLAIN Mode: Show the query execution plan without actually executing it (0 elapsed time, 0 output rows)
- Formatted Output: Display execution tree using ASCII box drawing with readable metrics
Example Query
PROFILE MATCH (n:person) RETURN n.name
Output:
╔════════════════════════════════════════╗
║ PROFILE REPORT ║
╚════════════════════════════════════════╝
Total output tuples: 4
Total elapsed time: 0.001 s
┌───────────────────────────────────────┐
│ ScanWithGPredOpr │
├───────────────────────────────────────┤
│ time: 0.001s | rows: 4 tuples │
└───────────────────────────────────────┘
┌───────────────────────────────────────┐
│ ProjectOpr │
├───────────────────────────────────────┤
│ time: 0.000s | rows: 4 tuples │
└───────────────────────────────────────┘
┌───────────────────────────────────────┐
│ SinkOpr │
├───────────────────────────────────────┤
│ time: 0.000s | rows: 4 tuples │
└───────────────────────────────────────┘
Objective
Implement PROFILE and EXPLAIN execution modes for NeuG to help users analyze query execution performance and understand query execution plans.
Requirements
Example Query
Output: