Skip to content

feat: add database profiler support for multiple databases - #419

Merged
gibiw merged 1 commit into
mainfrom
feat/db
Nov 4, 2025
Merged

feat: add database profiler support for multiple databases#419
gibiw merged 1 commit into
mainfrom
feat/db

Conversation

@gibiw

@gibiw gibiw commented Nov 4, 2025

Copy link
Copy Markdown
Contributor
  • Introduced a new Database Profiler to track and log database operations for MongoDB, MySQL, PostgreSQL, SQLite, and Redis.
  • Updated qase.config.json to include a profilers array for enabling the database profiler.
  • Added comprehensive tests for each database type to ensure functionality.
  • Updated changelog to reflect the new version and changes.

This release enhances the ability to profile database operations, providing detailed insights into query performance and execution metrics.


Note

Adds a database profiler that captures queries for SQLite, PostgreSQL, MySQL, MongoDB, and Redis, integrates it with reporters, extends step modeling/formatting, and updates docs, examples, tests, and versioning.

  • Core/Profilers:
    • Introduce DatabaseProfiler and DatabaseProfilerSingleton in qase-python-commons/src/qase/commons/profilers/db.py with hooks for sqlalchemy, psycopg2, pymysql, sqlite3, pymongo, and redis.
    • Wire profiler into reporter lifecycle via QaseCoreReporter.setup_profilers() to enable/disable with "profilers": ["db"].
  • Models/API:
    • Extend StepDbQueryData to include database_type, execution_time, rows_affected, and connection_info in models/step.py.
    • Add StepType.DB_QUERY handling in ApiV2Client._prepare_step() to format action and input data for DB steps.
  • Docs:
    • Add docs/DATABASE_PROFILERS.md describing configuration, supported libraries, collected data, and examples.
  • Examples:
    • Update examples/pytest/qase.config.json to include "profilers": ["db"].
    • Add DB client deps in examples/pytest/requirements.txt.
    • Add tests for SQLite, PostgreSQL, MySQL, MongoDB, and Redis profilers under examples/pytest/tests/.
  • Versioning/Changelog:
    • Bump qase-python-commons to 4.1.3 and add changelog entry noting DB profiler support.

Written by Cursor Bugbot for commit bcc2b94. This will update automatically on new commits. Configure here.

- Introduced a new Database Profiler to track and log database operations for MongoDB, MySQL, PostgreSQL, SQLite, and Redis.
- Updated `qase.config.json` to include a `profilers` array for enabling the database profiler.
- Added comprehensive tests for each database type to ensure functionality.
- Updated changelog to reflect the new version and changes.

This release enhances the ability to profile database operations, providing detailed insights into query performance and execution metrics.
@gibiw
gibiw merged commit ab1fb0a into main Nov 4, 2025
37 checks passed
@gibiw
gibiw deleted the feat/db branch November 4, 2025 15:34
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