Ticket #608 (closed defect: fixed)

Opened 2 months ago

Last modified 2 months ago

SQL Profiling improvements

Reported by: alex94040 Owned by:
Priority: important Milestone: 2.0.2 Stable
Component: Database adapter Version: 2.0 HEAD
Keywords: Cc:

Description (last modified by alex94040) (diff)

Intention:
1) Refactor the database adapters in such a way that it'd be easy to inject new kinds of logging. Side effect: none of the adapters now don't have to do a silly "check if not connected and connect!" in every other method.
2) Add time-based logging using QTimer (how long does each query take)

Based on the qcodo code from klucznik (see http://qcu.be/content/my-modifications-and-improvements-qcodo)

Note that this BREAKS compatibility with old database adapters (those that are not included in the core), but in a very straighforward, simple way:
1) Rename Query() to ExecuteQuery() and make it protected. Same with NonQuery?() - rename it to ExecuteNonQuery()
2) Remove all calls to LogQuery() and checks to see if connected (that stuff is done automatically at the base class level).

Attachments

betterProfiling_v1.patch (42.5 kB) - added by alex94040 2 months ago.
v1 of the patch

Change History

Changed 2 months ago by alex94040

v1 of the patch

Changed 2 months ago by alex94040

  • status changed from new to in_QA
  • description modified (diff)

Changed 2 months ago by alex94040

Note that v1 of the patch also includes the new CSS (it's the cleanup from QCodo) - I'd like to have all of our CSS get moved over there slowly. This is just the first step.

Changed 2 months ago by VexedPanda

I like it. If it tests ok, I'd say commit. :)

Changed 2 months ago by alex94040

  • status changed from in_QA to closed
  • resolution set to fixed

(In [936]) Fixes #608 (SQL Profiling improvements). Code by klucznik and alex94040. Review by VexedPanda?.

Note: See TracTickets for help on using tickets.