5 #ifndef vnsw_agent_flow_stats_maanger_h
6 #define vnsw_agent_flow_stats_maanger_h
14 #include <sandesh/common/flow_types.h>
18 #define FLOW_EXPORT_STATS_TRACE(...)\
20 FlowExportStatsTrace::TraceMsg(FlowExportStatsTraceBuf, __FILE__, __LINE__, __VA_ARGS__);\
57 uint64_t interval, uint64_t timeout) :
80 typedef std::map<const FlowAgingTableKey, FlowAgingTablePtr>
82 typedef std::pair<const FlowAgingTableKey, FlowAgingTablePtr>
98 uint64_t flow_stats_interval,
99 uint64_t flow_cache_timeout);
107 uint32_t packets, uint32_t oflow_bytes,
110 void Init(uint64_t flow_stats_interval, uint64_t flow_cache_timeout);
114 FlowAgingTableMap::iterator
begin() {
118 FlowAgingTableMap::iterator
end() {
125 bool RequestHandler(boost::shared_ptr<FlowStatsCollectorReq> req);
126 void AddReqHandler(boost::shared_ptr<FlowStatsCollectorReq> req);
128 void FreeReqHandler(boost::shared_ptr<FlowStatsCollectorReq> req);
231 #endif //vnsw_agent_flow_stats_manager_h
uint32_t session_export_count() const
uint64_t session_export_disable_drops() const
boost::shared_ptr< SessionStatsCollectorObject > SessionStatsCollectorPtr
tbb::atomic< uint64_t > session_exports_
uint64_t session_slo_logging_drops() const
tbb::atomic< bool > sessions_sampled_atleast_once_
tbb::atomic< uint64_t > session_slo_logging_drops_
FlowAgingTableMap flow_aging_table_map_
void Free(const FlowAgingTableKey &key)
void set_delete_short_flow(bool val)
FlowStatsCollectorReq(Event ev, const FlowAgingTableKey &k, uint64_t interval, uint64_t timeout)
boost::shared_ptr< FlowStatsCollectorObject > FlowAgingTablePtr
uint32_t session_export_without_sampling_reset()
FlowAgingTableMap::iterator begin()
std::pair< const FlowAgingTableKey, FlowAgingTablePtr > FlowAgingTableEntry
tbb::atomic< uint64_t > session_export_disable_drops_
bool operator<(const FlowAgingTableKey &rhs) const
void set_sessions_sampled_atleast_once()
tbb::atomic< uint64_t > session_global_slo_logging_drops_
void Add(const FlowAgingTableKey &key, uint64_t flow_stats_interval, uint64_t flow_cache_timeout)
tbb::atomic< uint64_t > session_export_drops_
boost::shared_ptr< TraceBuffer< SandeshTrace > > SandeshTraceBufferPtr
uint64_t threshold() const
void Init(uint64_t flow_stats_interval, uint64_t flow_cache_timeout)
SessionStatsCollectorPtr session_stats_collector_obj_
uint32_t session_export_rate_
uint32_t session_export_count_reset()
FlowAgingTableMap::iterator end()
void AddReqHandler(boost::shared_ptr< FlowStatsCollectorReq > req)
FlowAgingTablePtr default_flow_stats_collector_obj_
static const uint32_t kDefaultFlowSamplingThreshold
uint32_t prev_cfg_flow_export_rate_
bool UpdateSessionThreshold(void)
SessionStatsCollectorObject * session_stats_collector_obj()
static const uint32_t kMinFlowSamplingThreshold
void FreeReqHandler(boost::shared_ptr< FlowStatsCollectorReq > req)
bool RequestHandler(boost::shared_ptr< FlowStatsCollectorReq > req)
static void FlowStatsReqHandler(Agent *agent, uint32_t proto, uint32_t port, uint64_t protocol)
void UpdateSessionMsgExportStats(uint32_t count)
void UpdateSessionExportStats(uint32_t count, bool first_export, bool sampled)
friend class AgentUtXmlFlowThresholdValidate
static const uint8_t kCatchAllProto
WorkQueue< boost::shared_ptr< FlowStatsCollectorReq > > request_queue_
void Delete(const FlowAgingTableKey &key)
std::map< const FlowAgingTableKey, FlowAgingTablePtr > FlowAgingTableMap
void AddEvent(FlowEntryPtr &flow)
FlowAgingTableKey(const uint8_t &protocol, const uint16_t &dst_port)
void SetProfileData(ProfileData *data)
SandeshTraceBufferPtr FlowExportStatsTraceBuf
FlowStatsCollectorObject * proto(int protocol)
void UpdateStatsEvent(const FlowEntryPtr &flow, uint32_t bytes, uint32_t packets, uint32_t oflow_bytes, const boost::uuids::uuid &u)
FlowStatsCollector * GetFlowStatsCollector(const FlowEntry *p) const
uint64_t prev_flow_export_rate_compute_time_
void DeleteEvent(const FlowEntryPtr &flow, const RevFlowDepParams ¶ms)
tbb::atomic< uint64_t > session_msg_exports_
uint64_t flow_cache_timeout
uint32_t session_export_drops() const
IndexVector< FlowStatsCollector * > instance_table_
FlowStatsManager(Agent *agent)
friend class AgentUtXmlFlowThreshold
uint64_t flow_stats_interval
uint64_t session_exports() const
void UpdateThreshold(uint64_t new_value, bool check_oflow)
tbb::atomic< uint64_t > session_export_sampling_drops_
uint32_t session_export_sampling_drops() const
bool delete_short_flow() const
FlowStatsCollectorObject * protocol_list_[256]
bool operator==(const FlowAgingTableKey &rhs) const
tbb::atomic< uint64_t > session_sample_exports_
tbb::atomic< uint32_t > session_export_count_
tbb::atomic< uint32_t > session_export_without_sampling_
FlowStatsCollectorObject * GetFlowStatsCollectorObject(const FlowEntry *flow) const
uint64_t session_sample_exports() const
uint32_t session_export_rate() const
static const uint64_t FlowThresoldUpdateTime
void DeleteReqHandler(boost::shared_ptr< FlowStatsCollectorReq > req)
void UpdateSessionSampleExportStats(uint32_t count)
const FlowStatsCollectorObject * Find(uint32_t proto, uint32_t port) const
void FreeIndex(uint32_t idx)
FlowStatsCollectorObject * default_flow_stats_collector_obj()
uint64_t session_global_slo_logging_drops() const
void set_session_export_count(uint32_t count)
uint64_t session_msg_exports() const
boost::intrusive_ptr< FlowEntry > FlowEntryPtr
FlowStatsCollectorReq(Event ev, const FlowAgingTableKey &k)