History

V8 memory usage statistics

ksuprynowicz committed 3 years ago

Commit 56c3bad1 parent 2faacfa6 files · +130 −33Browse files

Showing the changes to libraries/script-engine/src/ScriptManagerScriptingInterface.h (1 of 6 files). Show all

Unified · Split

libraries/script-engine/src/ScriptManagerScriptingInterface.h+24−0
@@ -479,6 +479,30 @@ public: · 478 unmodified lines
479479 */
480480 Q_INVOKABLE QString getExternalPath(ExternalResource::Bucket bucket, const QString& path) { return _manager->getExternalPath(bucket, path); }
481481
482+ /**jsdoc
483+ * <p>Object containing memory usage statistics data.</p>
484+ * <table>
485+ * <thead>
486+ * <tr><th>Name</th><th>Type</th><th>Description</th></tr>
487+ * </thead>
488+ * <tbody>
489+ * <tr><td><code>totalHeapSize</code></td><td>{number}</td><td>Total heap size allocated by scripting engine.</td></tr>
490+ * <tr><td><code>usedHeapSize</code></td><td>{number}</td><td></td>Amount of heap memory that is currently in use.</tr>
491+ * <tr><td><code>totalAvailableSize</code></td><td>{number}</td><td>Amount of remaining available heap memory</td></tr>
492+ * <tr><td><code>totalGlobalHandlesSize</code></td><td>{number}</td><td>V8-specific property</td></tr>
493+ * <tr><td><code>usedGlobalHandlesSize</code></td><td>{number}</td><td>V8-specific property</td></tr>
494+ * </tbody>
495+ * </table>
496+ * @typedef {object} Script.MemoryUsageData
497+ */
498+
499+ /**jsdoc
500+ * Returns memory usage statistics data.
501+ * @function Script.getMemoryUsageStatistics
502+ * @Returns {Script.MemoryUsageData} Object containing statistics about memory usage.
503+ */
504+ Q_INVOKABLE QVariantMap getMemoryUsageStatistics();
505+
482506 signals:
483507
484508 /**jsdoc