superluminal_d ~main

D bindings to the Superluminal Performance API


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

Superluminal Performance API for D

This is a binding to the Superluminal Performance API headers for D.

You will need to have Superluminal installed for this to work. By default the dynamic configuration is used, for this configuration you will need to add version "EnablePerfAPI" to your dub configuration to enable the performance api. This allows you to turn it off while not profiling.

When the performance API is turned off, all function calls to it will be directed to dummy implementations.

Example

import superluminal.performance;

void main() {
    PerformanceAPI_Functions perfApi;
    auto module_ = loadAPIFrom("PerformanceAPI.dll", &perfAPI);

    // Add instrumentation event
    {
        perfAPI.beginEvent("My Event", null, PERFORMANCEAPI_DEFAULT_COLOR);

        // Long running code goes here.

        perfAPI.endEvent();
    }

    // You can unload the API after you're done using it.
    unloadAPI(module_);
}

Authors:
  • Kitsunebi Games
Dependencies:
none
Versions:
1.0.1 2024-Oct-17
1.0.0 2024-Oct-17
~main 2024-Oct-17
Show all 3 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 0 downloads total

Score:
0.3
Short URL:
superluminal_d.dub.pm