The resource profiler. More...
#include <kanzi/core.ui/resource/resource_profiler.hpp>
Public Types | |
typedef unordered_map< ContextFactoryContainerKey, ResourceProfilingContextFactoryUniquePtr > | ContextFactoryContainer |
The context factory container type. | |
typedef const ResourceLoaderThreadContext * | ContextFactoryContainerKey |
The context factory container key. | |
Public Member Functions | |
ResourceProfilingContextFactory & | createContextFactory (ContextFactoryContainerKey key) |
Creates a context factory. | |
ResourceProfilingDataSampleSharedPtr | createResourceProfilingDataSample (ResourceProfilingContextSharedPtr acquireContext, string_view url) |
Creates a resource profiling data sample. | |
ResourceProfilingContextFactory & | getContextFactory (ContextFactoryContainerKey key) |
Gets a context factory. | |
ResourceProfilingContextFactory & | getMainThreadContextFactory () |
Gets the main thread context factory. | |
const ContextFactoryContainer & | getResourceProfilingContexts () const |
Gets the container of context factories. | |
const ResourceProfilingDataSample::Factory & | getResourceProfilingDataSampleFactory () const |
Gets a resource profiling data sample factory. | |
const ResourceProfilingDataSample::Factory::ResourceProfilingDataSampleContainer & | getResourceProfilingDataSamples () const |
Gets resource profiling data samples. | |
void | resetProfilingData () |
Resets profiling data. | |
Static Public Member Functions | |
static ResourceProfilerUniquePtr | createProfiler (ContextFactoryContainerKey mainThreadContext) |
Creates profiler singleton. | |
The resource profiler.
The context factory container key.
The key is a thread context of the loading thread for which the factory is created.
typedef unordered_map<ContextFactoryContainerKey, ResourceProfilingContextFactoryUniquePtr> kanzi::ResourceProfiler::ContextFactoryContainer |
The context factory container type.
const ContextFactoryContainer & kanzi::ResourceProfiler::getResourceProfilingContexts | ( | ) | const |
Gets the container of context factories.
ResourceProfilingContextFactory & kanzi::ResourceProfiler::getContextFactory | ( | ContextFactoryContainerKey | key | ) |
Gets a context factory.
key | The key of the factory to return. |
ResourceProfilingContextFactory & kanzi::ResourceProfiler::getMainThreadContextFactory | ( | ) |
Gets the main thread context factory.
ResourceProfilingContextFactory & kanzi::ResourceProfiler::createContextFactory | ( | ContextFactoryContainerKey | key | ) |
Creates a context factory.
key | The key value for new factory. |
|
inline |
Gets a resource profiling data sample factory.
|
inline |
Creates a resource profiling data sample.
acquireContext | The acquire context of the profiled resource. |
url | The URL of the profiled resource. |
|
inline |
Gets resource profiling data samples.
|
static |
Creates profiler singleton.
mainThreadContext | The main thread context. |
void kanzi::ResourceProfiler::resetProfilingData | ( | ) |
Resets profiling data.