Make WordPress Core

Opened 10 years ago

Last modified 9 years ago

#38760 new enhancement

Capture result size in bytes when SAVEQUERIES is true

Reported by: danielbachhuber Owned by:
Priority: normal Milestone: Future Release
Component: Database Version:
Severity: normal Keywords: needs-patch
Cc: Focuses:

Description

Inside of WP_DB::_do_query(), it would be neat if $this->result was measured as size in bytes, so debugging tools had a better sense of how much data was running over the network.

Change History (1)

#1 @birgire
9 years ago

I like the idea, but I briefly searched for a way and could only find estimates with:

  • memory_get_usage() - i.e. difference before and after
  • string length on a serialized object.

Not sure how useful it would be here?

Maybe there are other better ways?

Note: See TracTickets for help on using tickets.