WordPress.org

Make WordPress Core

Opened 16 months ago

Last modified 5 months ago

#38760 new enhancement

Capture result size in bytes when SAVEQUERIES is true

Reported by: 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
5 months 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.