Flutter Engine
The Flutter Engine
Classes | Namespaces | Typedefs
sampling_profiler.h File Reference
#include <functional>
#include <memory>
#include <optional>
#include <string>
#include "flutter/fml/synchronization/count_down_latch.h"
#include "flutter/fml/task_runner.h"
#include "flutter/fml/trace_event.h"

Go to the source code of this file.

Classes

struct  flutter::CpuUsageInfo
 CPU usage stats. num_threads is the number of threads owned by the process. It is to be noted that this is not per shell, there can be multiple shells within the process. total_cpu_usage is the percentage (between [0, 100]) cpu usage of the application. This is across all the cores, for example an application using 100% of all the core will report total_cpu_usage as 100, if it has 100% across 2 cores and 0% across the other cores, embedder must report total_cpu_usage as 50. More...
 
struct  flutter::MemoryUsageInfo
 Memory usage stats. dirty_memory_usage is the memory usage (in MB) such that the app uses its physical memory for dirty memory. Dirty memory is the memory data that cannot be paged to disk. owned_shared_memory_usage is the memory usage (in MB) such that the app uses its physical memory for shared memory, including loaded frameworks and executables. On iOS, it's physical memory - dirty memory. More...
 
struct  flutter::GpuUsageInfo
 Polled information related to the usage of the GPU. More...
 
struct  flutter::ProfileSample
 Container for the metrics we collect during each run of Sampler. This currently holds CpuUsageInfo and MemoryUsageInfo but the intent is to expand it to other metrics. More...
 
class  flutter::SamplingProfiler
 a Sampling Profiler that runs peridically and calls the Sampler which servers as a value function to gather various profiling metrics as represented by ProfileSample. These profiling metrics are then posted to the Dart VM Service timeline. More...
 

Namespaces

namespace  flutter
 

Typedefs

using flutter::Sampler = std::function< ProfileSample(void)>
 Sampler is run during SamplingProfiler::SampleRepeatedly. Each platform should implement its version of a Sampler if they decide to participate in gathering profiling metrics. More...