Lines Matching full:profiler
30 // The goal of the Profiler is to profile the performance of camemra pipeline.
32 // The profiler prints out the result when the Profiler obejct is deconstructed.
35 // - To disable the profiler:
36 // $ adb shell setprop persist.vendor.camera.profiler 0
38 // $ adb shell setprop persist.vendor.camera.profiler 1
39 // - To dump the profiling result to "/data/vendor/camera/profiler":
40 // $ adb shell setprop persist.vendor.camera.profiler 2
41 // - To print and dump the profiling result to "/data/vendor/camera/profiler":
42 // $ adb shell setprop persist.vendor.camera.profiler 3
44 // Option 0 (kDisable): Disable Profiler
105 // By default the profiler is disabled.
108 // 1. To Create a profiler, please call Profiler::Create(...).
112 // SetDumpFilePrefix(), which is default to "/vendor/camera/profiler/".
119 // std::unique_ptr<Profiler> profiler = Profiler::Create(Profiler::kPrintBit);
120 // profiler->SetUseCase("Profiling Example");
123 // profiler->Start("Foo function", i);
125 // profiler->End("Foo function", i);
127 // profiler->Start("Bar function", i);
129 // profiler->End("Bar function", i);
131 // profiler->Start("Bar function", i);
133 // profiler->End("Bar function", i);
143 class Profiler {
148 // Create profiler.
149 static std::shared_ptr<Profiler> Create(int option);
151 virtual ~Profiler() = default;
172 // Customized profiler derived from Profiler
176 // Setup the name of use case the profiler is running.
178 // usecase: the name use case of the profiler is running.
190 // The user specifies the name, and the profiler will print the name and its
208 // creating profiler needs to set option with kPrintFpsPerIntervalBit bit.
221 Profiler() = default;
229 // profiler: profiler object.
232 ScopedProfiler(std::shared_ptr<Profiler> profiler, const std::string target, in ScopedProfiler() argument
234 : profiler_(profiler), in ScopedProfiler()
240 ScopedProfiler(std::shared_ptr<Profiler> profiler, const std::string target) in ScopedProfiler() argument
241 : profiler_(profiler), target_(std::move(target)) { in ScopedProfiler()
242 request_id_ = Profiler::kInvalidRequestId; in ScopedProfiler()
248 profiler_ = Profiler::Create(option); in ScopedProfiler()
249 request_id_ = Profiler::kInvalidRequestId; in ScopedProfiler()
258 std::shared_ptr<Profiler> profiler_;