C

Implementing performance metrics platform APIs

Implementing Performance metrics

Derive from the Qul::Platform::PerformanceMetrics structure and override the virtual functions for maximum heap usage, maximum stack usage, and CPU load.

struct ExamplePerformanceMetrics : PerformanceMetrics
{
    uint64_t maxHeapUsage() QUL_DECL_OVERRIDE
    {
        /*Custom maximum heap usage function depending on Platform and toolchains.*/
        return 0;
    }
    uint64_t maxStackUsage() QUL_DECL_OVERRIDE
    {
        /*Custom maximum stack usage function depending on Platform and toolchains.*/
        return 0;
    }
#if defined(QUL_ENABLE_HARDWARE_PERFORMANCE_LOGGING)
    float cpuLoad() QUL_DECL_OVERRIDE
    {
        /*Custom CPU load measurement function depending on Platform and toolchains.*/
        return 0.f;
    };
#endif
};

Available under certain Qt licenses.
Find out more.