Provide stack trace information in sql debug entries
|Reported by:||calvin@…||Owned by:||PhiR|
|Component:||Database layer (models, ORM)||Version:||master|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
when profiling django views I often use the list of stored SQL queries to review. What I am missing there is where each of the SQL statements comes from. So I added a stack frame text to each of them.
I have not measured the performance impact, but since it only affects installations with DEBUG=True, I consider the tradeoff acceptable.
The patch also simplifies the debug entry by splitting off the storing to a separate method save_entry().
Change History (9)
Changed 8 years ago by Bastian Kleineidam <calvin@…>
comment:1 Changed 8 years ago by Simon G. <dev@…>
- Has patch set
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Design decision needed
Changed 8 years ago by PhiR
comment:5 Changed 8 years ago by PhiR
- Triage Stage changed from Design decision needed to Ready for checkin
comment:6 Changed 8 years ago by mtredinnick
- Resolution set to wontfix
- Status changed from assigned to closed