1 /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2 * Use of this source code is governed by a BSD-style license that can be 3 * found in the LICENSE file. 4 */ 5 6 #ifndef CRAS_SERVER_METRICS_H_ 7 #define CRAS_SERVER_METRICS_H_ 8 9 #include "cras_rstream.h" 10 11 extern const char kNoCodecsFoundMetric[]; 12 extern const char kHighestInputHardwareLevel[]; 13 extern const char kHighestOutputHardwareLevel[]; 14 extern const char kStreamTimeoutMilliSeconds[]; 15 extern const char kStreamCallbackThreshold[]; 16 extern const char kStreamFlags[]; 17 extern const char kStreamSamplingFormat[]; 18 extern const char kStreamSamplingRate[]; 19 extern const char kUnderrunsPerDevice[]; 20 21 /* Logs the highest hardware level of a device. */ 22 int cras_server_metrics_highest_hw_level(unsigned hw_level, 23 enum CRAS_STREAM_DIRECTION direction); 24 25 /* Logs the longest fetch delay of a stream in millisecond. */ 26 int cras_server_metrics_longest_fetch_delay(int delay_msec); 27 28 /* Logs the number of underruns of a device. */ 29 int cras_server_metrics_num_underruns(unsigned num_underruns); 30 31 /* Logs the stream configurations from clients. */ 32 int cras_server_metrics_stream_config(struct cras_rstream_config *config); 33 34 /* Initialize metrics logging stuff. */ 35 int cras_server_metrics_init(); 36 37 #endif /* CRAS_SERVER_METRICS_H_ */ 38 39