LCOV - code coverage report
Current view: top level - vnsw/agent/uve - agent_uve_stats.cc (source / functions) Hit Total Coverage
Test: OpenSDN C/C++ coverage (all TARGET_SET jobs) Lines: 25 32 78.1 %
Date: 2026-08-03 02:19:58 Functions: 6 8 75.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :  * Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
       3             :  */
       4             : 
       5             : #include <base/cpuinfo.h>
       6             : #include <db/db.h>
       7             : #include <cmn/agent_cmn.h>
       8             : #include <oper/interface_common.h>
       9             : #include <oper/interface.h>
      10             : 
      11             : #include <uve/stats_collector.h>
      12             : #include <uve/agent_uve_stats.h>
      13             : #include <uve/stats_interval_types.h>
      14             : #include <init/agent_param.h>
      15             : #include <oper/mirror_table.h>
      16             : #include <uve/vrouter_stats_collector.h>
      17             : #include <uve/vm_uve_table.h>
      18             : #include <uve/vn_uve_table.h>
      19             : #include <uve/vrouter_uve_entry.h>
      20             : #include <uve/interface_uve_stats_table.h>
      21             : 
      22           3 : AgentUveStats::AgentUveStats(Agent *agent, uint64_t intvl,
      23           3 :                              uint32_t default_intvl, uint32_t incremental_intvl)
      24             :     : AgentUveBase(agent, intvl, default_intvl, incremental_intvl),
      25           3 :       stats_manager_(new StatsManager(agent)) {
      26           3 :       vn_uve_table_.reset(new VnUveTable(agent, default_intvl));
      27           3 :       vm_uve_table_.reset(new VmUveTable(agent, default_intvl));
      28           3 :       vrouter_uve_entry_.reset(new VrouterUveEntry(agent));
      29           3 :       interface_uve_table_.reset(new InterfaceUveStatsTable(agent,
      30           3 :                                                             default_intvl));
      31           3 : }
      32             : 
      33           3 : AgentUveStats::~AgentUveStats() {
      34           3 : }
      35             : 
      36         153 : StatsManager *AgentUveStats::stats_manager() const {
      37         153 :     return stats_manager_.get();
      38             : }
      39             : 
      40           3 : void AgentUveStats::Shutdown() {
      41           3 :     AgentUveBase::Shutdown();
      42           3 :     stats_manager_->Shutdown();
      43           3 : }
      44             : 
      45           3 : void AgentUveStats::RegisterDBClients() {
      46           3 :     AgentUveBase::RegisterDBClients();
      47           3 :     stats_manager_->RegisterDBClients();
      48           3 : }
      49             : 
      50           3 : void AgentUveStats::InitDone() {
      51           3 :     AgentUveBase::InitDone();
      52           3 :     stats_manager_->InitDone();
      53           3 : }
      54             : 
      55             : // The following is deprecated and is present only for backward compatibility
      56           0 : void GetStatsInterval::HandleRequest() const {
      57           0 :     StatsIntervalResp_InSeconds *resp = new StatsIntervalResp_InSeconds();
      58           0 :     resp->set_agent_stats_interval(0);
      59           0 :     resp->set_flow_stats_interval(0);
      60           0 :     resp->set_context(context());
      61           0 :     resp->Response();
      62           0 :     return;
      63             : }

Generated by: LCOV version 1.14