class Logger
Defined at line 31 of file ../../src/camera/lib/cobalt_logger/logger.h
Log events to cobalt.
Public Methods
void ~Logger ()
Defined at line 37 of file ../../src/camera/lib/cobalt_logger/logger.h
void Logger (async_dispatcher_t * dispatcher, std::shared_ptr<sys::ServiceDirectory> services, std::unique_ptr<timekeeper::Clock> clock)
We expect fuchsia.metrics.MetricEventLoggerFactory to be in |services|.
Defined at line 38 of file ../../src/camera/lib/cobalt_logger/logger.cc
void LogInteger (uint32_t metric_id, std::vector<uint32_t> dimensions, uint64_t value)
Log event with no dimensions.
Defined at line 40 of file ../../src/camera/lib/cobalt_logger/logger.h
void LogOccurrence (uint32_t metric_id, std::vector<uint32_t> dimensions)
Log event with fuchsia.metrics.MetricEventLogger with the provided parameters. If the service
is not accessible, keep the parameters to try again later.
Defined at line 46 of file ../../src/camera/lib/cobalt_logger/logger.h
void LogElapsedTime (uint32_t metric_id, std::vector<uint32_t> dimensions, uint64_t timer_id)
Log the time elapsed in microseconds since starting the timer with id |timer_id| with
fuchsia.metrics.MetricEventLogger. If the service is not accessible, keep the parameters to
try again later.
This does not stop the timer.
Defined at line 59 of file ../../src/camera/lib/cobalt_logger/logger.h
void LogDuration (uint32_t metric_id, std::vector<uint32_t> dimensions, zx::duration duration)
Log a duration in microseconds. If the service is not accessible, keep the parameters to try
again later.
Defined at line 67 of file ../../src/camera/lib/cobalt_logger/logger.h
uint64_t StartTimer ()
Start a timer and return the id to that timer. The id is needed to log the elapsed time since
starting the timer.
Defined at line 141 of file ../../src/camera/lib/cobalt_logger/logger.cc
void Shutdown ()
Immediately shutdown |Logger| so it can no longer be used to log events.
Defined at line 54 of file ../../src/camera/lib/cobalt_logger/logger.cc
template <typename DimensionType, typename... RestDimensionTypes>
std::vector<uint32_t> BuildDimension (DimensionType dimension, RestDimensionTypes... rest)
Defined at line 77 of file ../../src/camera/lib/cobalt_logger/logger.h
StreamType ConvertStreamType (fuchsia::camera2::CameraStreamType type)
Defined at line 194 of file ../../src/camera/lib/cobalt_logger/logger.cc
Protected Methods
void LogEvent (Event event)
Defined at line 118 of file ../../src/camera/lib/cobalt_logger/logger.cc