Skip to content

Commit

Permalink
Merge "Move active_flows from VrouterStatsAgent to VrouterStatsAgent.…
Browse files Browse the repository at this point in the history
…flow_rate" into R2.22.x
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Apr 19, 2016
2 parents 562a243 + d8e5f35 commit 9b69ed7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
3 changes: 2 additions & 1 deletion src/analytics/viz.sandesh
Original file line number Diff line number Diff line change
Expand Up @@ -1306,7 +1306,8 @@ const list<stat_table> _STAT_TABLES = [
{ 'name' : 'flow_rate.min_flow_adds_per_second', 'datatype' : 'int', 'index' : false },
{ 'name' : 'flow_rate.deleted_flows', 'datatype' : 'int', 'index' : false },
{ 'name' : 'flow_rate.max_flow_deletes_per_second', 'datatype' : 'int', 'index' : false },
{ 'name' : 'flow_rate.min_flow_deletes_per_second', 'datatype' : 'int', 'index' : false }
{ 'name' : 'flow_rate.min_flow_deletes_per_second', 'datatype' : 'int', 'index' : false },
{ 'name' : 'flow_rate.active_flows', 'datatype' : 'int', 'index' : false }
]
}
]
Expand Down
2 changes: 1 addition & 1 deletion src/vnsw/agent/uve/vrouter.sandesh
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ struct VrouterFlowRate {
4: u32 deleted_flows;
5: u32 max_flow_deletes_per_second;
6: u32 min_flow_deletes_per_second;
7: optional u64 active_flows; //'dial' type. So no diff. Always aggregate
}

struct VrouterStatsAgent { // Agent stats
Expand Down Expand Up @@ -214,7 +215,6 @@ struct VrouterStatsAgent { // Agent stats
18: optional u64 exception_packets_denied;
19: optional u64 exception_packets_allowed;
20: optional u64 total_flows;
21: optional u64 active_flows;
22: optional u64 aged_flows;
23: optional u64 aged_flows_dp;
24: optional u64 active_flows_dp;
Expand Down
8 changes: 1 addition & 7 deletions src/vnsw/agent/uve/vrouter_uve_entry.cc
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,6 @@ bool VrouterUveEntry::SendVrouterMsg() {
change = true;
}

uint64_t active_flow_count = agent_->pkt()->flow_table()->Size();
if (prev_stats_.get_active_flows() != active_flow_count || first) {
stats.set_active_flows(active_flow_count);
prev_stats_.set_active_flows(active_flow_count);
change = true;
}

if (prev_stats_.get_aged_flows() !=
agent_->stats()->flow_aged() || first) {
stats.set_aged_flows(agent_->stats()->flow_aged());
Expand Down Expand Up @@ -244,6 +237,7 @@ bool VrouterUveEntry::SendVrouterMsg() {
flow_rate.set_deleted_flows(aged_flows);
flow_rate.set_max_flow_deletes_per_second(max_del_rate);
flow_rate.set_min_flow_deletes_per_second(min_del_rate);
flow_rate.set_active_flows(agent_->pkt()->flow_table()->Size());
stats.set_flow_rate(flow_rate);
change = true;
agent_->stats()->ResetFlowAddMinMaxStats(cur_time);
Expand Down

0 comments on commit 9b69ed7

Please sign in to comment.