Kanzi Framework  3.9.0
Kanzi Engine API
kanzi::ResourceProfiler Class Reference

The resource profiler. More...

#include <kanzi/core.ui/resource/resource_profiler.hpp>

Public Types

typedef unordered_map< ContextFactoryContainerKey, ResourceProfilingContextFactoryUniquePtrContextFactoryContainer
 The context factory container type. More...
 
typedef const ResourceLoaderThreadContextContextFactoryContainerKey
 The context factory container key. More...
 

Public Member Functions

ResourceProfilingContextFactorycreateContextFactory (ContextFactoryContainerKey key)
 Creates a context factory. More...
 
ResourceProfilingDataSampleSharedPtr createResourceProfilingDataSample (ResourceProfilingContextSharedPtr acquireContext, string_view url)
 Creates a resource profiling data sample. More...
 
ResourceProfilingContextFactorygetContextFactory (ContextFactoryContainerKey key)
 Gets a context factory. More...
 
ResourceProfilingContextFactorygetMainThreadContextFactory ()
 Gets the main thread context factory. More...
 
const ContextFactoryContainergetResourceProfilingContexts () const
 Gets the container of context factories. More...
 
const ResourceProfilingDataSample::FactorygetResourceProfilingDataSampleFactory () const
 Gets a resource profiling data sample factory. More...
 
const ResourceProfilingDataSample::Factory::ResourceProfilingDataSampleContainergetResourceProfilingDataSamples () const
 Gets resource profiling data samples. More...
 
void resetProfilingData ()
 Resets profiling data. More...
 

Static Public Member Functions

static ResourceProfilerUniquePtr createProfiler (ContextFactoryContainerKey mainThreadContext)
 Creates profiler singleton. More...
 

Detailed Description

The resource profiler.

Member Typedef Documentation

◆ ContextFactoryContainerKey

The context factory container key.

The key is a thread context of the loading thread for which the factory is created.

◆ ContextFactoryContainer

Member Function Documentation

◆ getResourceProfilingContexts()

const ContextFactoryContainer& kanzi::ResourceProfiler::getResourceProfilingContexts ( ) const

Gets the container of context factories.

Returns
The container of context factories.

◆ getContextFactory()

ResourceProfilingContextFactory& kanzi::ResourceProfiler::getContextFactory ( ContextFactoryContainerKey  key)

Gets a context factory.

Parameters
keyThe key of the factory to return.

◆ getMainThreadContextFactory()

ResourceProfilingContextFactory& kanzi::ResourceProfiler::getMainThreadContextFactory ( )

Gets the main thread context factory.

Returns
The main thread context factory.

◆ createContextFactory()

ResourceProfilingContextFactory& kanzi::ResourceProfiler::createContextFactory ( ContextFactoryContainerKey  key)

Creates a context factory.

Parameters
keyThe key value for new factory.

◆ getResourceProfilingDataSampleFactory()

const ResourceProfilingDataSample::Factory& kanzi::ResourceProfiler::getResourceProfilingDataSampleFactory ( ) const
inline

Gets a resource profiling data sample factory.

Returns
The resource profiling data sample factory.

◆ createResourceProfilingDataSample()

ResourceProfilingDataSampleSharedPtr kanzi::ResourceProfiler::createResourceProfilingDataSample ( ResourceProfilingContextSharedPtr  acquireContext,
string_view  url 
)
inline

Creates a resource profiling data sample.

Parameters
acquireContextThe acquire context of the profiled resource.
urlThe URL of the profiled resource.
Returns
The resource profiling data sample.

◆ getResourceProfilingDataSamples()

const ResourceProfilingDataSample::Factory::ResourceProfilingDataSampleContainer& kanzi::ResourceProfiler::getResourceProfilingDataSamples ( ) const
inline

Gets resource profiling data samples.

Returns
The resource profiling data samples container.

◆ createProfiler()

static ResourceProfilerUniquePtr kanzi::ResourceProfiler::createProfiler ( ContextFactoryContainerKey  mainThreadContext)
static

Creates profiler singleton.

Parameters
mainThreadContextThe main thread context.

◆ resetProfilingData()

void kanzi::ResourceProfiler::resetProfilingData ( )

Resets profiling data.


The documentation for this class was generated from the following file: