1. API
  2. performance

API

Methods for understanding desktop performance.

Remarks

This package exposes a number of methods that allow you to access performance information such as CPU usage.

Functions

Function Description
getBlinkMemoryInfo() Returns an object with Blink memory information. It can be useful for debugging rendering / DOM related memory issues. Note that all values are reported in Kilobytes.
getCPUUsage() Retrieves CPU usage.
getCreationTime() Indicates the creation time of the application. The time is represented as number of milliseconds since epoch.
getHeapStatistics() Returns an object with V8 heap statistics. Note that all statistics are reported in Kilobytes.
getIOCounters() Retrieves IO operation counters. Windows and Linux only.
getProcessMemoryInfo() Returns an object giving memory usage statistics about the current process. Note that all statistics are reported in Kilobytes.
getSystemMemoryInfo() Returns an object giving memory usage statistics about the entire system. Note that all statistics are reported in Kilobytes.

getBlinkMemoryInfo()

Returns an object with Blink memory information. It can be useful for debugging rendering / DOM related memory issues. Note that all values are reported in Kilobytes.

Signature:

        import { performance } from "@todesktop/client-core"
performance.getBlinkMemoryInfo(): Promise<Electron.BlinkMemoryInfo>;

      

Returns:

Promise<Electron.BlinkMemoryInfo>

BlinkMemoryInfo object.

getCPUUsage()

Retrieves CPU usage.

Signature:

        import { performance } from "@todesktop/client-core"
performance.getCPUUsage(): Promise<Electron.CPUUsage>;

      

Returns:

Promise<Electron.CPUUsage>

CPUUsage object.

getCreationTime()

Indicates the creation time of the application. The time is represented as number of milliseconds since epoch.

Signature:

        import { performance } from "@todesktop/client-core"
performance.getCreationTime(): Promise<number>;

      

Returns:

Promise<number>

number.

getHeapStatistics()

Returns an object with V8 heap statistics. Note that all statistics are reported in Kilobytes.

Signature:

        import { performance } from "@todesktop/client-core"
performance.getHeapStatistics(): Promise<Electron.HeapStatistics>;

      

Returns:

Promise<Electron.HeapStatistics>

HeapStatistics object.

getIOCounters()

Retrieves IO operation counters. Windows and Linux only.

Signature:

        import { performance } from "@todesktop/client-core"
performance.getIOCounters(): Promise<Electron.IOCounters>;

      

Returns:

Promise<Electron.IOCounters>

IOCounters object.

getProcessMemoryInfo()

Returns an object giving memory usage statistics about the current process. Note that all statistics are reported in Kilobytes.

Signature:

        import { performance } from "@todesktop/client-core"
performance.getProcessMemoryInfo(): Promise<Electron.ProcessMemoryInfo>;

      

Returns:

Promise<Electron.ProcessMemoryInfo>

ProcessMemoryInfo object.

getSystemMemoryInfo()

Returns an object giving memory usage statistics about the entire system. Note that all statistics are reported in Kilobytes.

Signature:

        import { performance } from "@todesktop/client-core"
performance.getSystemMemoryInfo(): Promise<Electron.SystemMemoryInfo>;

      

Returns:

Promise<Electron.SystemMemoryInfo>

SystemMemoryInfo object.