How the README and top-level example expect named metrics to be created and measured.
Intended analyzer integration
Expected integration sequence
- 1 Parameterize the analyzer with the transaction type consumed from an analysis connection.
- 2 Create named metric objects during analyzer construction or setup.
- 3 Connect the producer's analysis port to the analyzer implementation.
- 4 In write(), extract numeric fields or derived values and measure the corresponding named metric.
- 5 Print or query aggregates at the desired reporting phase.
Top-level usage sketch
metric_analyzer#(int) analyzer;
analyzer = metric_analyzer#(int)::type_id::create("metric_analyzer", null);
analyzer.create_metric("latency");
analyzer.measure("latency", 20);
analyzer.print();
The checked-in top.sv uses integer dummy values only to demonstrate naming and reporting. In a real environment, calls belong in the analyzer's transaction path rather than a top-level loop.