LCOV - code coverage report
Current view: top level - feature/metrics - metrics_sys.c (source / functions) Hit Total Coverage
Test: lcov.info Lines: 6 6 100.0 %
Date: 2021-11-24 03:28:48 Functions: 2 2 100.0 %

          Line data    Source code
       1             : /* Copyright (c) 2020-2021, The Tor Project, Inc. */
       2             : /* See LICENSE for licensing information */
       3             : 
       4             : /**
       5             :  * @file metrics_sys.c
       6             :  * @brief Setup and tear down the metrics subsystem.
       7             :  **/
       8             : 
       9             : #include "lib/subsys/subsys.h"
      10             : 
      11             : #include "feature/metrics/metrics.h"
      12             : #include "feature/metrics/metrics_sys.h"
      13             : 
      14             : static int
      15         244 : subsys_metrics_initialize(void)
      16             : {
      17         244 :   metrics_init();
      18         244 :   return 0;
      19             : }
      20             : 
      21             : static void
      22         235 : subsys_metrics_shutdown(void)
      23             : {
      24         235 :   metrics_cleanup();
      25         235 : }
      26             : 
      27             : const subsys_fns_t sys_metrics = {
      28             :   SUBSYS_DECLARE_LOCATION(),
      29             : 
      30             :   .name = "metrics",
      31             :   .supported = true,
      32             :   .level = METRICS_SUBSYS_LEVEL,
      33             : 
      34             :   .initialize = subsys_metrics_initialize,
      35             :   .shutdown = subsys_metrics_shutdown,
      36             : };
      37             : 

Generated by: LCOV version 1.14