overwolf.benchmarking

A set of functions for querying system stats and benchmarks. These calls require administrative permissions. To achieve administrative permissions the user may be prompted with a UAC message which can interrupt him while in game.In order to not interrupt the user, it is recommended to ask him before requesting permissions.

Methods

requestHardwareInfo(interval, callback)

Version added: 0.78

Requests hardware information within a given interval. Note that this call requires Overwolf to have Administrative permissions. If it does not have it, the callback will return with ‘Permissions Required’. You will then have to ask the app user for permissions and according to the user’s choice, call requestPermissions. It is then required to call requestProcessInfo again.

  • Parameter: interval <int>

    The desired maximal interval (in milliseconds) in which events will be triggered. Minimum is 500ms.

  • Parameter: callback <function>

    A callback function which will be called with the status of the request.

requestProcessInfo(interval, callback)

Version added: 0.78

Requests process information within a given interval. See requestPermissions for administrative permissions instructions.

  • Parameter: interval <int>

    The desired maximal interval (in milliseconds) in which events will be triggered. Minimum is 500ms.

  • Parameter: callback <function>

    A callback function which will be called with the status of the request.

requestFpsInfo(interval, callback)

Version added: 0.78

Requests game fps information within a given interval.

  • Parameter: interval <int>

    The desired maximal interval (in milliseconds) in which events will be triggered.
  • Parameter: callback <function>

    A callback function which will be called with the status of the request.

stopRequesting()

Version added: 0.78

Stops receiving hardware/process events. Use this when you no longer want to receive events or when you close your app.

requestPermissions(callback)

Version added: 0.78

In case Overwolf requires administrative permissions, and after prompting the user of the app to request more permissions, call this function and then request your desired benchmarking information.

  • Parameter: callback <function>

    A callback function which will be called with the status of the request.

Events How to use events

onHardwareInfoReady

Version added: 0.78

Fired when hardware information is ready with a JSON containing the information.

Event value:
{
    "General": {
        "PowerPlan": "Balanced"
    },
    "Mainboard": {
        "Name": "ASUS P8H61-M",
        "Voltages": [
            {
                "Name": "CPU VCore",
                "Value": 0.968,
...

onProcessInfoReady

Version added: 0.78

Fired when process information is ready with a JSON containing the information.

Event value:
{
    "TopCpuUsage": [
        {
            "PrivateWorkingSet": 17674240,
            "PrecentProcessorTime": 5.703688196431727,
            "Id": 6988,
            "Name": "OverwolfBrowser#3"
        },
        {
            "PrivateWorkingSet": 16150528,
            "PrecentProcessorTime": 5.703688196431727,
            "Id": 8216,
            "Name": "OverwolfBenchmarking"
        },
        ...
    ],
    "TopMemoryUsage": [
        {
            "PrivateWorkingSet": 611196928,
            "PrecentProcessorTime": 2.851844098215878,
            "Id": 5484,
            "Name": "firefox"
        },
        {
            "PrivateWorkingSet": 141586432,
            "PrecentProcessorTime": 2.851844098215878,
            "Id": 596,
            "Name": "Overwolf"
        },
        ...
    ]
}

onFpsInfoReady

Version added: 0.78

Fired when fps information is ready with a JSON containing the information.

Event value:
{
    "Fps": 61
}