Created
August 28, 2020 22:30
-
-
Save ncalexan/2653f70b2a171ee6aa3f715c4c4ab0dc to your computer and use it in GitHub Desktop.
This file contains 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
(() => { | |
let mgr = Cc["@mozilla.org/memory-reporter-manager;1"]. | |
getService(Ci.nsIMemoryReporterManager); | |
let amounts = [ | |
"vsize", | |
// "vsizeMaxContiguous", | |
"resident", | |
// "residentFast", | |
"residentPeak", | |
"residentUnique", | |
"heapAllocated", | |
"heapOverheadFraction", | |
// "JSMainRuntimeGCHeap", | |
// "JSMainRuntimeTemporaryPeak", | |
// "JSMainRuntimeRealmsSystem", | |
// "JSMainRuntimeRealmsUser", | |
// "imagesContentUsedUncompressed", | |
// "storageSQLite", | |
// "lowMemoryEventsVirtual", | |
// "lowMemoryEventsCommitSpace", | |
// "lowMemoryEventsPhysical", | |
// "ghostWindows", | |
// "pageFaultsHard", | |
]; | |
for (let i = 0; i < amounts.length; i++) { | |
let amount = mgr[amounts[i]]; | |
console.log(`amounts: ${amounts[i]}:\t${amount}`); | |
} | |
const { AppConstants } = ChromeUtils.import( | |
"resource://gre/modules/AppConstants.jsm" | |
); | |
// Can't use app info from xpcshell. | |
// let appInfo = Cc["@mozilla.org/xre/app-info;1"] | |
// .getService(Ci.nsIXULAppInfo); | |
console.log(`version: ${AppConstants.MOZ_APP_VERSION}:\t${AppConstants.MOZ_BUILDID}`); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment