diff options
Diffstat (limited to 'perfprofd/perfprofdcore.h')
-rw-r--r-- | perfprofd/perfprofdcore.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/perfprofd/perfprofdcore.h b/perfprofd/perfprofdcore.h index 1e1e80ab..6ea24ab1 100644 --- a/perfprofd/perfprofdcore.h +++ b/perfprofd/perfprofdcore.h @@ -18,8 +18,15 @@ #ifndef SYSTEM_EXTRAS_PERFPROFD_PERFPROFDCORE_H_ #define SYSTEM_EXTRAS_PERFPROFD_PERFPROFDCORE_H_ +#include <functional> +#include <memory> + struct Config; +namespace wireless_android_play_playlog { +class AndroidPerfProfile; +} + namespace perfprofd { struct Symbolizer; } @@ -77,7 +84,13 @@ PROFILE_RESULT encode_to_proto(const std::string &data_file_path, unsigned cpu_utilization, perfprofd::Symbolizer* symbolizer); -void ProfilingLoop(Config& config); +PROFILE_RESULT SerializeProtobuf(wireless_android_play_playlog::AndroidPerfProfile* encodedProfile, + const char* encoded_file_path); + +using HandlerFn = std::function<bool(wireless_android_play_playlog::AndroidPerfProfile* proto, + Config* config)>; + +void ProfilingLoop(Config& config, HandlerFn handler); // // Exposed for unit testing |