Search completed in 0.96 seconds.
7 results for "drain":
Debugger.Memory - Firefox Developer Tools
Tools › Debugger-API › Debugger.Memory
given a debugger.object instancedobj referring to some object, dobj.allocationsite returns a saved call stack indicating wheredobj’s referent was allocated. allocation logging ifdbg is a debugger instance, and dbg.memory.trackingallocationsites is set to true, then the javascript engine logs each object allocated bydbg’s debuggee code. you can retrieve the current log by calling dbg.memory.drainallocationslog. you can control the limit on the log’s size by setting dbg.memory.maxallocationsloglength. censuses a census is a complete traversal of the graph of all reachable memory items belonging to a particular debugger‘s debuggees. it produces a count of those items, broken down by various criteria. ifdbg is a debugger instance, you can call dbg.memory.takecensus to conduct a census ...
...imum allocationsamplingprobability of all the debuggers is used. maxallocationsloglength the maximum number of allocation sites to accumulate in the allocations log at a time. this accessor can be both fetched and stored to. its default value is 5000. allocationslogoverflowed returns true if there have been more than [maxallocationsloglength][#max-alloc-log] allocations since the last time [drainallocationslog][#drain-alloc-log] was called and some data has been lost. returns false otherwise. debugger.memory handler functions similar to debugger’s handler functions, debugger.memory inherits accessor properties that store handler functions for spidermonkey to call when given events occur in debuggee code. unlike debugger‘s hooks, debugger.memory’s handlers’ return values are no...
Handling common HTML and CSS problems - Learn web development
Learn › Tools and testing › Cross browser testing › HTML and CSS
the prefix-free javascript library can be attached to a page, and will automatically detect what capabilities are possessed by browsers viewing the page and add prefixes as appropriate. it is really easy and convenient to use, although it does have some downsides (see the link above for details), and it is arguable that parsing every stylesheet in your site and add prefixes at run time can be a drain on the computer's processing power for a large site. another solution is to add prefixes automatically during development, and this (and other things besides) can be done using tools like autoprefixer and postcss. these tools can be used in a variety of ways, for example autoprefixer has an online version that allows you to enter your non-prefixed css on the left, and gives you a prefix-added ve...
Power profiling overview
Mozilla › Performance › Power profiling overview
-system) measurements that are affected by running programs but also by other things such as (for laptops) how bright the monitor backlight is. devices such as ammeters give the best results, but these can be expensive and difficult to set up. a cruder technique that works with mobile machines and devices is to run a program for a long time and simply time how long it takes for the battery to drain. the long measurement times required are a disadvantage, though. power estimates the next best measurements come from recent (sandy bridge and later) intel processors that implement the rapl (running average power limit) interface that provides msrs containing energy consumption estimates for up to four power planes or domains of a machine, as seen in the diagram above. pkg: the entire pack...
Shell global objects
Mozilla › Projects › SpiderMonkey › Shell global objects
o params.tostring. { tonumber } apply js::tonumber to params.tonumber. { eval } apply js::evaluate to params.eval. the return value is an array of strings, with one element for each javascript invocation that occurred as a result of the given operation. each element is the name of the function invoked, or the string 'eval:filename' if the code was invoked by eval or something similar. drainjobqueue() take jobs from the shell's job queue in fifo order and run them until the queue is empty. setpromiserejectiontrackercallback() sets the callback to be invoked whenever a promise rejection is unhandled or a previously-unhandled rejection becomes handled. functions available only in debug build disassemble([fun/code]) return the disassembly for the given function or code. all dis...
Tutorial: Show Allocations Per Call Path - Firefox Developer Tools
Tools › Debugger-API › Tutorial-Allocation-Log-Tree
ontentwindow; console.log("tracking allocations in page: " + w.location.href); // make that window a debuggee of our debugger. dbg.adddebuggee(w.wrappedjsobject); // enable allocation tracking in dbg's debuggees. dbg.memory.trackingallocationsites = true; } window.demoplotallocations = function() { // grab the allocation log. var log = dbg.memory.drainallocationslog(); // neutralize the debugger, and drop it on the floor // for the gc to collect. console.log("stopping allocation tracking."); dbg.removealldebuggees(); dbg = undefined; // analyze and display the allocation log. plot(log); } function handleuncaughtexception(ex) { console.log('debugger hook threw:'); console.log(ex.tostring()); console...
Battery Status API - Web APIs
Web › API › Battery Status API
the battery status api, more often referred to as the battery api, provides information about the system's battery charge level and lets you be notified by events that are sent when the battery level or charging status change. this can be used to adjust your app's resource usage to reduce battery drain when the battery is low, or to save changes before the battery runs out in order to prevent data loss. the battery status api extends window.navigator with a navigator.getbattery() method returning a battery promise, which is resolved in a batterymanager object providing also some new events you can handle to monitor the battery status. example in this example, we watch for changes both to the charging status (whether or not we're plugged in and charging) and for changes to the battery leve...
Index - Web APIs
Web › API › Index
api api, apps, battery, battery api, battery status api, guide, mobile, obsolete, overview the battery status api, more often referred to as the battery api, provides information about the system's battery charge level and lets you be notified by events that are sent when the battery level or charging status change. this can be used to adjust your app's resource usage to reduce battery drain when the battery is low, or to save changes before the battery runs out in order to prevent data loss. 264 batterymanager api, battery api, device api, interface, obsolete, reference, référence(2) the batterymanager interface provides ways to get information about the system's battery charge level. 265 batterymanager.charging api, battery api, needsmarkupwork...