OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
StatsManager Class Reference

#include <stats_manager.h>

Collaboration diagram for StatsManager:

Classes

struct  FlowRuleMatchInfo
 
struct  InterfaceStats
 
struct  VrfStats
 

Public Types

typedef std::map< const
Interface *, InterfaceStats
InterfaceStatsTree
 
typedef std::pair< const
Interface *, InterfaceStats
InterfaceStatsPair
 
typedef std::map< int, VrfStatsVrfIdToVrfStatsTree
 
typedef std::pair< int, VrfStatsVrfStatsPair
 
typedef std::map< const
boost::uuids::uuid,
FlowRuleMatchInfo
FlowAceTree
 
typedef std::pair< const
boost::uuids::uuid,
FlowRuleMatchInfo
FlowAcePair
 

Public Member Functions

 StatsManager (Agent *agent)
 
virtual ~StatsManager ()
 
vr_drop_stats_req drop_stats () const
 
void set_drop_stats (const vr_drop_stats_req &req)
 
InterfaceStatsGetInterfaceStats (const Interface *intf)
 
VrfStatsGetVrfStats (int vrf_id)
 
std::string GetNamelessVrf ()
 
int GetNamelessVrfId ()
 
void Shutdown (void)
 
void RegisterDBClients ()
 
void InitDone ()
 
bool RequestHandler (boost::shared_ptr< FlowUveStatsRequest > req)
 
void EnqueueEvent (const boost::shared_ptr< FlowUveStatsRequest > &req)
 
bool BuildFlowRate (AgentStats::FlowCounters &created, AgentStats::FlowCounters &aged, FlowRateComputeInfo &flow_info, VrouterFlowRate &flow_rate) const
 
void BuildDropStats (const vr_drop_stats_req &r, AgentDropStats &ds) const
 

Private Member Functions

void VrfNotify (DBTablePartBase *partition, DBEntryBase *e)
 
void InterfaceNotify (DBTablePartBase *part, DBEntryBase *e)
 
void AddNamelessVrfStatsEntry ()
 
void AddInterfaceStatsEntry (const Interface *intf)
 
void DelInterfaceStatsEntry (const Interface *intf)
 
void AddUpdateVrfStatsEntry (const VrfEntry *intf)
 
void DelVrfStatsEntry (const VrfEntry *intf)
 
void AddFlow (const FlowUveStatsRequest *req)
 
void DeleteFlow (const FlowUveStatsRequest *req)
 
bool FlowStatsUpdate ()
 
 DISALLOW_COPY_AND_ASSIGN (StatsManager)
 

Private Attributes

VrfIdToVrfStatsTree vrf_stats_tree_
 
InterfaceStatsTree if_stats_tree_
 
FlowAceTree flow_ace_tree_
 
vr_drop_stats_req drop_stats_
 
DBTableBase::ListenerId vrf_listener_id_
 
DBTableBase::ListenerId intf_listener_id_
 
Agentagent_
 
WorkQueue< boost::shared_ptr
< FlowUveStatsRequest > > 
request_queue_
 
Timertimer_
 

Friends

class AgentStatsCollectorTest
 

Detailed Description

Definition at line 35 of file stats_manager.h.

Member Typedef Documentation

Definition at line 199 of file stats_manager.h.

Definition at line 198 of file stats_manager.h.

Definition at line 145 of file stats_manager.h.

Definition at line 144 of file stats_manager.h.

Definition at line 146 of file stats_manager.h.

typedef std::pair<int, VrfStats> StatsManager::VrfStatsPair

Definition at line 147 of file stats_manager.h.

Constructor & Destructor Documentation

StatsManager::StatsManager ( Agent agent)
explicit

Definition at line 11 of file stats_manager.cc.

Here is the call graph for this function:

StatsManager::~StatsManager ( )
virtual

Definition at line 24 of file stats_manager.cc.

Member Function Documentation

void StatsManager::AddFlow ( const FlowUveStatsRequest req)
private

Definition at line 258 of file stats_manager.cc.

Here is the call graph for this function:

void StatsManager::AddInterfaceStatsEntry ( const Interface intf)
private

Definition at line 27 of file stats_manager.cc.

Here is the call graph for this function:

void StatsManager::AddNamelessVrfStatsEntry ( )
private

Definition at line 45 of file stats_manager.cc.

Here is the call graph for this function:

void StatsManager::AddUpdateVrfStatsEntry ( const VrfEntry intf)
private

Definition at line 51 of file stats_manager.cc.

Here is the call graph for this function:

void StatsManager::BuildDropStats ( const vr_drop_stats_req &  r,
AgentDropStats &  ds 
) const

Definition at line 436 of file stats_manager.cc.

bool StatsManager::BuildFlowRate ( AgentStats::FlowCounters created,
AgentStats::FlowCounters aged,
FlowRateComputeInfo flow_info,
VrouterFlowRate &  flow_rate 
) const

Definition at line 354 of file stats_manager.cc.

Here is the call graph for this function:

void StatsManager::DeleteFlow ( const FlowUveStatsRequest req)
private

Definition at line 316 of file stats_manager.cc.

Here is the call graph for this function:

void StatsManager::DelInterfaceStatsEntry ( const Interface intf)
private

Definition at line 37 of file stats_manager.cc.

void StatsManager::DelVrfStatsEntry ( const VrfEntry intf)
private

Definition at line 69 of file stats_manager.cc.

Here is the call graph for this function:

StatsManager::DISALLOW_COPY_AND_ASSIGN ( StatsManager  )
private
vr_drop_stats_req StatsManager::drop_stats ( ) const
inline

Definition at line 204 of file stats_manager.h.

void StatsManager::EnqueueEvent ( const boost::shared_ptr< FlowUveStatsRequest > &  req)

Definition at line 335 of file stats_manager.cc.

Here is the call graph for this function:

bool StatsManager::FlowStatsUpdate ( )
private

Definition at line 415 of file stats_manager.cc.

Here is the call graph for this function:

StatsManager::InterfaceStats * StatsManager::GetInterfaceStats ( const Interface intf)

Definition at line 103 of file stats_manager.cc.

std::string StatsManager::GetNamelessVrf ( )
inline

Definition at line 210 of file stats_manager.h.

int StatsManager::GetNamelessVrfId ( )
inline

Definition at line 211 of file stats_manager.h.

StatsManager::VrfStats * StatsManager::GetVrfStats ( int  vrf_id)

Definition at line 114 of file stats_manager.cc.

void StatsManager::InitDone ( )

Definition at line 431 of file stats_manager.cc.

Here is the call graph for this function:

void StatsManager::InterfaceNotify ( DBTablePartBase part,
DBEntryBase e 
)
private

Definition at line 124 of file stats_manager.cc.

Here is the call graph for this function:

void StatsManager::RegisterDBClients ( )

Definition at line 186 of file stats_manager.cc.

Here is the call graph for this function:

bool StatsManager::RequestHandler ( boost::shared_ptr< FlowUveStatsRequest req)

Definition at line 340 of file stats_manager.cc.

Here is the call graph for this function:

void StatsManager::set_drop_stats ( const vr_drop_stats_req &  req)
inline

Definition at line 205 of file stats_manager.h.

void StatsManager::Shutdown ( void  )

Definition at line 196 of file stats_manager.cc.

Here is the call graph for this function:

void StatsManager::VrfNotify ( DBTablePartBase partition,
DBEntryBase e 
)
private

Definition at line 167 of file stats_manager.cc.

Here is the call graph for this function:

Friends And Related Function Documentation

friend class AgentStatsCollectorTest
friend

Definition at line 223 of file stats_manager.h.

Member Data Documentation

Agent* StatsManager::agent_
private

Definition at line 243 of file stats_manager.h.

vr_drop_stats_req StatsManager::drop_stats_
private

Definition at line 240 of file stats_manager.h.

FlowAceTree StatsManager::flow_ace_tree_
private

Definition at line 239 of file stats_manager.h.

InterfaceStatsTree StatsManager::if_stats_tree_
private

Definition at line 238 of file stats_manager.h.

DBTableBase::ListenerId StatsManager::intf_listener_id_
private

Definition at line 242 of file stats_manager.h.

WorkQueue<boost::shared_ptr<FlowUveStatsRequest> > StatsManager::request_queue_
private

Definition at line 244 of file stats_manager.h.

Timer* StatsManager::timer_
private

Definition at line 245 of file stats_manager.h.

DBTableBase::ListenerId StatsManager::vrf_listener_id_
private

Definition at line 241 of file stats_manager.h.

VrfIdToVrfStatsTree StatsManager::vrf_stats_tree_
private

Definition at line 237 of file stats_manager.h.


The documentation for this class was generated from the following files: