Make WordPress Core

Opened 7 years ago

Last modified 6 years ago

#38760 new enhancement

Capture result size in bytes when SAVEQUERIES is true

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

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
6 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.