Last active
July 27, 2016 19:01
-
-
Save foozlereducer/fc12f8c37138e60813bd33e8699a5344 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function mem( $key, $in_or_out = 'in' ) { | |
| if ( ! isset( $this->mem_usage ) ) { | |
| $this->mem_usage = array(); | |
| } | |
| $this->mem_usage[ $key ] = array( 'memory' => memory_get_usage(), 'in or out' => $in_or_out ); | |
| } | |
| function console_log_mem() { | |
| echo '<script>' . 'console.log(' . json_encode( $this->mem_usage ) . ');</script>'; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment