LCOV - code coverage report
Current view: top level - feature/hs - hs_stats.c (source / functions) Hit Total Coverage
Test: lcov.info Lines: 3 10 30.0 %
Date: 2021-11-24 03:28:48 Functions: 1 4 25.0 %

          Line data    Source code
       1             : /* Copyright (c) 2016-2021, The Tor Project, Inc. */
       2             : /* See LICENSE for licensing information */
       3             : 
       4             : /**
       5             :  * \file hs_stats.c
       6             :  * \brief Keeps stats about the activity of our onion service(s).
       7             :  **/
       8             : 
       9             : #include "core/or/or.h"
      10             : #include "feature/hs/hs_stats.h"
      11             : #include "feature/hs/hs_service.h"
      12             : 
      13             : /** Number of v3 INTRODUCE2 cells received */
      14             : static uint32_t n_introduce2_v3 = 0;
      15             : /** Number of attempts to make a circuit to a rendezvous point */
      16             : static uint32_t n_rendezvous_launches = 0;
      17             : 
      18             : /** Note that we received another INTRODUCE2 cell. */
      19             : void
      20           3 : hs_stats_note_introduce2_cell(void)
      21             : {
      22           3 :   n_introduce2_v3++;
      23           3 : }
      24             : 
      25             : /** Return the number of v3 INTRODUCE2 cells we have received. */
      26             : uint32_t
      27           0 : hs_stats_get_n_introduce2_v3_cells(void)
      28             : {
      29           0 :   return n_introduce2_v3;
      30             : }
      31             : 
      32             : /** Note that we attempted to launch another circuit to a rendezvous point. */
      33             : void
      34           0 : hs_stats_note_service_rendezvous_launch(void)
      35             : {
      36           0 :   n_rendezvous_launches++;
      37           0 : }
      38             : 
      39             : /** Return the number of rendezvous circuits we have attempted to launch. */
      40             : uint32_t
      41           0 : hs_stats_get_n_rendezvous_launches(void)
      42             : {
      43           0 :   return n_rendezvous_launches;
      44             : }
      45             : 

Generated by: LCOV version 1.14