Add simple malloc statistics and metrics

Add some basic statistics for allocated memory based on mallinfo(),
and use that to define two metrics:

 usedAfterOverview: bytes used after the overview is shown once
 leakedAfterOverview: additional bytes used when the overview is
   shown a second time.

https://bugzilla.gnome.org/show_bug.cgi?id=618189
This commit is contained in:
Owen W. Taylor
2010-05-11 15:53:55 -04:00
parent c972ff3ab4
commit 08b8b39a5d
3 changed files with 85 additions and 2 deletions

View File

@ -94,6 +94,15 @@ function scriptEvent(name) {
Shell.PerfLog.get_default().event("script." + name);
}
/**
* collectStatistics
*
* Convenience function to trigger statistics collection
*/
function collectStatistics() {
Shell.PerfLog.get_default().collect_statistics();
}
function _step(g, finish, onError) {
try {
let waitFunction = g.next();