Skip to content

Database to fire events #105

@lonnieezell

Description

@lonnieezell

I've been thinking about how the toolbar collectors work lately, and think it might make more sense to have some of the modified to fire events instead of storing data that is accessed by the Collectors. This is cleaner code, and allows for a lot more flexibility. The database engine is the first one that really makes to me. By having events fired off listeners could be provided that:

  • collect data to be shown in the Debug Toolbar
  • analyze queries to automatically detect slow queries and tell the user
  • analyze queries (in MySQL) using EXPLAIN to detect queries that could benefit from rewriting or missing indexes.
  • etc.

This would require refactoring the Database class to fire an event, and create a new listener for collecting the query information.

Enhancement Checklist:

  • Component(s) modified
  • Unit testing updated
  • User guide updated
  • Securely signed commits
  • Conforms to style guide

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementPRs that improve existing functionalities

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions