Skip to content

feat(generator): add pipeline stage performance metrics#21

Open
kunalbhardwaj2006 wants to merge 1 commit into
mainfrom
feature/generator-llm-cache-metrics-3
Open

feat(generator): add pipeline stage performance metrics#21
kunalbhardwaj2006 wants to merge 1 commit into
mainfrom
feature/generator-llm-cache-metrics-3

Conversation

@kunalbhardwaj2006
Copy link
Copy Markdown
Owner

Summary

This PR introduces a lightweight performance metrics utility for the generator pipeline.

The goal is to measure execution time for different pipeline stages so developers can better understand the performance characteristics of the generator.


Implementation

A new utility class has been added:

generator/src/metrics.py

The PipelineMetrics class allows developers to track the execution time of different pipeline stages using:

metrics.start(stage_name)
metrics.end(stage_name)

At the end of execution, a report can be generated to show how long each stage took.

Example output:

PDF Download completed in 5.2 seconds
Question Extraction completed in 18.7 seconds
Classification completed in 92.3 seconds


Benefits

• Improves observability of the generator pipeline
• Helps identify performance bottlenecks
• Makes future optimization easier


Future Improvements

This metrics system could be extended with:

• structured logging
• exporting metrics to monitoring tools
• visualizing pipeline execution performance


Feedback and suggestions are welcome.

@kunalbhardwaj2006
Copy link
Copy Markdown
Owner Author

Hi @bruno 👋

This PR introduces a small metrics utility to track execution time of generator pipeline stages.

The goal is to make it easier to identify slow steps in the asset generation process and help optimize the pipeline.

I'd appreciate any feedback or suggestions for improving this approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant