The previous commit added new stopwatches to all incremental engine nodes. Some pre-existing stopwatches measured the exact same thing, so they are removed from the code in this commit.
Signed-off-by: Mark Michelson <[email protected]> --- lib/stopwatch-names.h | 13 ------------- northd/en-advertised-route-sync.c | 8 -------- northd/en-group-ecmp-route.c | 5 ----- northd/en-learned-route-sync.c | 5 ----- northd/en-lflow.c | 5 ----- northd/en-lr-nat.c | 4 ---- northd/en-lr-stateful.c | 5 ----- northd/en-ls-arp.c | 6 ------ northd/en-ls-stateful.c | 5 ----- northd/en-meters.c | 6 ------ northd/en-northd.c | 4 ---- northd/en-port-group.c | 5 ----- northd/en-sync-from-sb.c | 5 ----- northd/ovn-northd.c | 13 ------------- tests/perf-northd.at | 20 ++++++++++---------- 15 files changed, 10 insertions(+), 99 deletions(-) diff --git a/lib/stopwatch-names.h b/lib/stopwatch-names.h index b912e813c..4d81d338c 100644 --- a/lib/stopwatch-names.h +++ b/lib/stopwatch-names.h @@ -16,11 +16,8 @@ #define STOPWATCH_NAMES_H 1 #define NORTHD_LOOP_STOPWATCH_NAME "ovn-northd-loop" -#define OVNNB_DB_RUN_STOPWATCH_NAME "ovnnb_db_run" -#define OVNSB_DB_RUN_STOPWATCH_NAME "ovnsb_db_run" #define BUILD_LFLOWS_CTX_STOPWATCH_NAME "build_flows_ctx" #define CLEAR_LFLOWS_CTX_STOPWATCH_NAME "clear_lflows_ctx" -#define BUILD_LFLOWS_STOPWATCH_NAME "build_lflows" #define LFLOWS_DATAPATHS_STOPWATCH_NAME "lflows_datapaths" #define LFLOWS_PORTS_STOPWATCH_NAME "lflows_ports" #define LFLOWS_LBS_STOPWATCH_NAME "lflows_lbs" @@ -29,15 +26,5 @@ #define LFLOWS_IGMP_STOPWATCH_NAME "lflows_igmp" #define LFLOWS_DP_GROUPS_STOPWATCH_NAME "lflows_dp_groups" #define LFLOWS_TO_SB_STOPWATCH_NAME "lflows_to_sb" -#define PORT_GROUP_RUN_STOPWATCH_NAME "port_group_run" -#define SYNC_METERS_RUN_STOPWATCH_NAME "sync_meters_run" -#define LR_NAT_RUN_STOPWATCH_NAME "lr_nat_run" -#define LR_STATEFUL_RUN_STOPWATCH_NAME "lr_stateful" -#define LS_STATEFUL_RUN_STOPWATCH_NAME "ls_stateful" -#define LS_ARP_RUN_STOPWATCH_NAME "ls_arp" -#define ADVERTISED_ROUTE_SYNC_RUN_STOPWATCH_NAME "advertised_route_sync" -#define LEARNED_ROUTE_SYNC_RUN_STOPWATCH_NAME "learned_route_sync" -#define DYNAMIC_ROUTES_RUN_STOPWATCH_NAME "dynamic_routes" -#define GROUP_ECMP_ROUTE_RUN_STOPWATCH_NAME "group_ecmp_route" #endif diff --git a/northd/en-advertised-route-sync.c b/northd/en-advertised-route-sync.c index be771391d..a200731f1 100644 --- a/northd/en-advertised-route-sync.c +++ b/northd/en-advertised-route-sync.c @@ -16,14 +16,12 @@ #include <config.h> -#include "stopwatch.h" #include "northd.h" #include "en-advertised-route-sync.h" #include "en-lr-nat.h" #include "en-lr-stateful.h" #include "lb.h" -#include "lib/stopwatch-names.h" #include "openvswitch/hmap.h" #include "ovn-util.h" @@ -247,15 +245,11 @@ en_advertised_route_sync_run(struct engine_node *node, void *data OVS_UNUSED) const struct sbrec_advertised_route_table *sbrec_advertised_route_table = EN_OVSDB_GET(engine_get_input("SB_advertised_route", node)); - stopwatch_start(ADVERTISED_ROUTE_SYNC_RUN_STOPWATCH_NAME, time_msec()); - advertised_route_table_sync(eng_ctx->ovnsb_idl_txn, sbrec_advertised_route_table, &routes_data->parsed_routes, &dynamic_routes_data->routes, &northd_data->ls_ports, routes_sync_data); - - stopwatch_stop(ADVERTISED_ROUTE_SYNC_RUN_STOPWATCH_NAME, time_msec()); return EN_UPDATED; } @@ -515,7 +509,6 @@ en_dynamic_routes_run(struct engine_node *node, void *data) en_dynamic_routes_clear(data); - stopwatch_start(DYNAMIC_ROUTES_RUN_STOPWATCH_NAME, time_msec()); const struct lr_stateful_record *lr_stateful_rec; HMAP_FOR_EACH (lr_stateful_rec, key_node, &lr_stateful_data->table.entries) { @@ -537,7 +530,6 @@ en_dynamic_routes_run(struct engine_node *node, void *data) build_lb_connected_routes(od, &lr_stateful_data->table, &dynamic_routes_data->routes); } - stopwatch_stop(DYNAMIC_ROUTES_RUN_STOPWATCH_NAME, time_msec()); return EN_UPDATED; } diff --git a/northd/en-group-ecmp-route.c b/northd/en-group-ecmp-route.c index 67f876e4b..cd4cdb991 100644 --- a/northd/en-group-ecmp-route.c +++ b/northd/en-group-ecmp-route.c @@ -19,12 +19,10 @@ #include "northd/lflow-mgr.h" #include "openvswitch/vlog.h" -#include "stopwatch.h" #include "northd.h" #include "en-group-ecmp-route.h" #include "en-learned-route-sync.h" -#include "lib/stopwatch-names.h" #include "openvswitch/hmap.h" VLOG_DEFINE_THIS_MODULE(en_group_ecmp_route); @@ -375,11 +373,8 @@ en_group_ecmp_route_run(struct engine_node *node, void *_data) struct learned_route_sync_data *learned_route_data = engine_get_input_data("learned_route_sync", node); - stopwatch_start(GROUP_ECMP_ROUTE_RUN_STOPWATCH_NAME, time_msec()); - group_ecmp_route(data, routes_data, learned_route_data); - stopwatch_stop(GROUP_ECMP_ROUTE_RUN_STOPWATCH_NAME, time_msec()); return EN_UPDATED; } diff --git a/northd/en-learned-route-sync.c b/northd/en-learned-route-sync.c index 15a165fa9..4e2d284ee 100644 --- a/northd/en-learned-route-sync.c +++ b/northd/en-learned-route-sync.c @@ -18,11 +18,9 @@ #include <stdbool.h> #include "openvswitch/vlog.h" -#include "stopwatch.h" #include "northd.h" #include "en-learned-route-sync.h" -#include "lib/stopwatch-names.h" #include "openvswitch/hmap.h" #include "ovn-util.h" @@ -131,14 +129,11 @@ en_learned_route_sync_run(struct engine_node *node, void *data) EN_OVSDB_GET(engine_get_input("SB_learned_route", node)); struct northd_data *northd_data = engine_get_input_data("northd", node); - stopwatch_start(LEARNED_ROUTE_SYNC_RUN_STOPWATCH_NAME, time_msec()); - routes_table_sync(sbrec_learned_route_table, &northd_data->lr_ports, &northd_data->lr_datapaths, &routes_sync_data->parsed_routes); - stopwatch_stop(LEARNED_ROUTE_SYNC_RUN_STOPWATCH_NAME, time_msec()); return EN_UPDATED; } diff --git a/northd/en-lflow.c b/northd/en-lflow.c index 41a5a97ff..940bd18bd 100644 --- a/northd/en-lflow.c +++ b/northd/en-lflow.c @@ -34,8 +34,6 @@ #include "lib/inc-proc-eng.h" #include "northd.h" -#include "stopwatch.h" -#include "lib/stopwatch-names.h" #include "timeval.h" #include "openvswitch/vlog.h" @@ -129,8 +127,6 @@ en_lflow_run(struct engine_node *node, void *data) struct lflow_input lflow_input; lflow_get_input_data(node, &lflow_input); - stopwatch_start(BUILD_LFLOWS_STOPWATCH_NAME, time_msec()); - struct lflow_data *lflow_data = data; lflow_table_clear(lflow_data->lflow_table, search_mode == LFLOW_TABLE_SEARCH_FIELDS); @@ -139,7 +135,6 @@ en_lflow_run(struct engine_node *node, void *data) build_lflows(eng_ctx->ovnsb_idl_txn, &lflow_input, lflow_data->lflow_table); - stopwatch_stop(BUILD_LFLOWS_STOPWATCH_NAME, time_msec()); return EN_UPDATED; } diff --git a/northd/en-lr-nat.c b/northd/en-lr-nat.c index 45bdbab39..f0596d254 100644 --- a/northd/en-lr-nat.c +++ b/northd/en-lr-nat.c @@ -24,7 +24,6 @@ #include "include/openvswitch/hmap.h" #include "openvswitch/util.h" #include "openvswitch/vlog.h" -#include "stopwatch.h" /* OVN includes */ #include "en-lr-nat.h" @@ -33,7 +32,6 @@ #include "lib/ovn-nb-idl.h" #include "lib/ovn-sb-idl.h" #include "lib/ovn-util.h" -#include "lib/stopwatch-names.h" #include "northd.h" VLOG_DEFINE_THIS_MODULE(en_lr_nat); @@ -114,12 +112,10 @@ en_lr_nat_run(struct engine_node *node, void *data_) struct northd_data *northd_data = engine_get_input_data("northd", node); struct ed_type_lr_nat_data *data = data_; - stopwatch_start(LR_NAT_RUN_STOPWATCH_NAME, time_msec()); lr_nat_table_clear(&data->lr_nats); lr_nat_table_build(&data->lr_nats, &northd_data->lr_datapaths, &northd_data->lr_ports); - stopwatch_stop(LR_NAT_RUN_STOPWATCH_NAME, time_msec()); return EN_UPDATED; } diff --git a/northd/en-lr-stateful.c b/northd/en-lr-stateful.c index 212c0641c..171a3d53b 100644 --- a/northd/en-lr-stateful.c +++ b/northd/en-lr-stateful.c @@ -27,7 +27,6 @@ #include "lib/uuidset.h" #include "openvswitch/util.h" #include "openvswitch/vlog.h" -#include "stopwatch.h" /* OVN includes */ #include "en-lb-data.h" @@ -39,7 +38,6 @@ #include "lib/ovn-nb-idl.h" #include "lib/ovn-sb-idl.h" #include "lib/ovn-util.h" -#include "lib/stopwatch-names.h" #include "lflow-mgr.h" #include "northd.h" @@ -124,15 +122,12 @@ en_lr_stateful_run(struct engine_node *node, void *data_) struct lr_stateful_input input_data = lr_stateful_get_input_data(node); struct ed_type_lr_stateful *data = data_; - stopwatch_start(LR_STATEFUL_RUN_STOPWATCH_NAME, time_msec()); - lr_stateful_table_clear(&data->table); lr_stateful_table_build(&data->table, input_data.lr_nats, input_data.lr_datapaths, input_data.lb_datapaths_map, input_data.lbgrp_datapaths_map); - stopwatch_stop(LR_STATEFUL_RUN_STOPWATCH_NAME, time_msec()); return EN_UPDATED; } diff --git a/northd/en-ls-arp.c b/northd/en-ls-arp.c index a96b67928..021f5054f 100644 --- a/northd/en-ls-arp.c +++ b/northd/en-ls-arp.c @@ -18,7 +18,6 @@ #include "include/openvswitch/hmap.h" #include "openvswitch/util.h" #include "openvswitch/vlog.h" -#include "stopwatch.h" /* OVN includes */ #include "en-lr-nat.h" @@ -27,7 +26,6 @@ #include "lib/ovn-nb-idl.h" #include "lib/ovn-sb-idl.h" #include "lib/ovn-util.h" -#include "lib/stopwatch-names.h" #include "lflow-mgr.h" #include "northd.h" @@ -195,8 +193,6 @@ en_ls_arp_run(struct engine_node *node, void *data_) struct ls_arp_input input_data = ls_arp_get_input_data(node); struct ed_type_ls_arp *data = data_; - stopwatch_start(LS_ARP_RUN_STOPWATCH_NAME, time_msec()); - ls_arp_table_clear(&data->table); const struct ovn_datapath *od; @@ -210,8 +206,6 @@ en_ls_arp_run(struct engine_node *node, void *data_) ls_arp_record_create(&data->table, od, input_data.lr_nats); } - stopwatch_stop(LS_ARP_RUN_STOPWATCH_NAME, time_msec()); - return EN_UPDATED; } diff --git a/northd/en-ls-stateful.c b/northd/en-ls-stateful.c index bfef7bd91..4daeab20d 100644 --- a/northd/en-ls-stateful.c +++ b/northd/en-ls-stateful.c @@ -27,7 +27,6 @@ #include "lib/uuidset.h" #include "openvswitch/util.h" #include "openvswitch/vlog.h" -#include "stopwatch.h" /* OVN includes */ #include "en-lb-data.h" @@ -38,7 +37,6 @@ #include "lib/ovn-nb-idl.h" #include "lib/ovn-sb-idl.h" #include "lib/ovn-util.h" -#include "lib/stopwatch-names.h" #include "lflow-mgr.h" #include "northd.h" @@ -127,13 +125,10 @@ en_ls_stateful_run(struct engine_node *node, void *data_) struct ls_stateful_input input_data = ls_stateful_get_input_data(node); struct ed_type_ls_stateful *data = data_; - stopwatch_start(LS_STATEFUL_RUN_STOPWATCH_NAME, time_msec()); - ls_stateful_table_clear(&data->table); ls_stateful_table_build(&data->table, input_data.ls_datapaths, input_data.ls_port_groups); - stopwatch_stop(LS_STATEFUL_RUN_STOPWATCH_NAME, time_msec()); return EN_UPDATED; } diff --git a/northd/en-meters.c b/northd/en-meters.c index 288134108..ef0da25c9 100644 --- a/northd/en-meters.c +++ b/northd/en-meters.c @@ -17,10 +17,8 @@ #include <config.h> #include "openvswitch/vlog.h" -#include "stopwatch.h" #include "en-meters.h" -#include "lib/stopwatch-names.h" VLOG_DEFINE_THIS_MODULE(en_meters); @@ -68,14 +66,10 @@ en_sync_meters_run(struct engine_node *node, void *data_) const struct engine_context *eng_ctx = engine_get_context(); - stopwatch_start(SYNC_METERS_RUN_STOPWATCH_NAME, time_msec()); - build_meter_groups(&data->meter_groups, nb_meter_table); sync_meters(eng_ctx->ovnsb_idl_txn, nb_meter_table, acl_table, sb_meter_table, &data->meter_groups); - - stopwatch_stop(SYNC_METERS_RUN_STOPWATCH_NAME, time_msec()); return EN_UPDATED; } diff --git a/northd/en-northd.c b/northd/en-northd.c index 6815e6e39..92be3eb2f 100644 --- a/northd/en-northd.c +++ b/northd/en-northd.c @@ -28,8 +28,6 @@ * lib/ovn-parallel-hmap.h should be updated * to include this dependency itself */ #include "lib/ovn-parallel-hmap.h" -#include "stopwatch.h" -#include "lib/stopwatch-names.h" #include "northd.h" #include "lib/util.h" #include "openvswitch/vlog.h" @@ -150,9 +148,7 @@ en_northd_run(struct engine_node *node, void *data) northd_get_input_data(node, &input_data); COVERAGE_INC(northd_run); - stopwatch_start(OVNNB_DB_RUN_STOPWATCH_NAME, time_msec()); ovnnb_db_run(&input_data, data, eng_ctx->ovnsb_idl_txn); - stopwatch_stop(OVNNB_DB_RUN_STOPWATCH_NAME, time_msec()); return EN_UPDATED; } diff --git a/northd/en-port-group.c b/northd/en-port-group.c index d0b7961fb..c33c07976 100644 --- a/northd/en-port-group.c +++ b/northd/en-port-group.c @@ -17,10 +17,8 @@ #include <config.h> #include "openvswitch/vlog.h" -#include "stopwatch.h" #include "en-port-group.h" -#include "lib/stopwatch-names.h" #include "northd.h" VLOG_DEFINE_THIS_MODULE(en_port_group); @@ -529,8 +527,6 @@ en_port_group_run(struct engine_node *node, void *data_) struct port_group_input input_data = port_group_get_input_data(node); struct port_group_data *data = data_; - stopwatch_start(PORT_GROUP_RUN_STOPWATCH_NAME, time_msec()); - ls_port_group_table_clear(&data->ls_port_groups); port_group_ls_table_clear(&data->port_groups_lses); @@ -543,7 +539,6 @@ en_port_group_run(struct engine_node *node, void *data_) input_data.sbrec_port_group_table, eng_ctx->ovnsb_idl_txn); - stopwatch_stop(PORT_GROUP_RUN_STOPWATCH_NAME, time_msec()); return EN_UPDATED; } diff --git a/northd/en-sync-from-sb.c b/northd/en-sync-from-sb.c index dde0e9f55..de822115d 100644 --- a/northd/en-sync-from-sb.c +++ b/northd/en-sync-from-sb.c @@ -27,9 +27,6 @@ #include "lib/ovn-nb-idl.h" #include "lib/ovn-sb-idl.h" #include "lib/ovn-util.h" -#include "stopwatch.h" -#include "lib/stopwatch-names.h" -#include "timeval.h" #include "northd.h" #include "openvswitch/vlog.h" @@ -53,11 +50,9 @@ en_sync_from_sb_run(struct engine_node *node, void *data OVS_UNUSED) EN_OVSDB_GET(engine_get_input("SB_port_binding", node)); const struct sbrec_ha_chassis_group_table *sb_ha_ch_grp_table = EN_OVSDB_GET(engine_get_input("SB_ha_chassis_group", node)); - stopwatch_start(OVNSB_DB_RUN_STOPWATCH_NAME, time_msec()); ovnsb_db_run(eng_ctx->ovnsb_idl_txn, sb_pb_table, sb_ha_ch_grp_table, &nd->ls_ports, &nd->lr_ports); - stopwatch_stop(OVNSB_DB_RUN_STOPWATCH_NAME, time_msec()); return EN_UNCHANGED; } diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c index 7d7568c6f..0ed2eb17a 100644 --- a/northd/ovn-northd.c +++ b/northd/ovn-northd.c @@ -990,11 +990,8 @@ main(int argc, char *argv[]) free(ovn_version); stopwatch_create(NORTHD_LOOP_STOPWATCH_NAME, SW_MS); - stopwatch_create(OVNNB_DB_RUN_STOPWATCH_NAME, SW_MS); - stopwatch_create(OVNSB_DB_RUN_STOPWATCH_NAME, SW_MS); stopwatch_create(BUILD_LFLOWS_CTX_STOPWATCH_NAME, SW_MS); stopwatch_create(CLEAR_LFLOWS_CTX_STOPWATCH_NAME, SW_MS); - stopwatch_create(BUILD_LFLOWS_STOPWATCH_NAME, SW_MS); stopwatch_create(LFLOWS_DATAPATHS_STOPWATCH_NAME, SW_MS); stopwatch_create(LFLOWS_PORTS_STOPWATCH_NAME, SW_MS); stopwatch_create(LFLOWS_LBS_STOPWATCH_NAME, SW_MS); @@ -1003,16 +1000,6 @@ main(int argc, char *argv[]) stopwatch_create(LFLOWS_IGMP_STOPWATCH_NAME, SW_MS); stopwatch_create(LFLOWS_DP_GROUPS_STOPWATCH_NAME, SW_MS); stopwatch_create(LFLOWS_TO_SB_STOPWATCH_NAME, SW_MS); - stopwatch_create(PORT_GROUP_RUN_STOPWATCH_NAME, SW_MS); - stopwatch_create(SYNC_METERS_RUN_STOPWATCH_NAME, SW_MS); - stopwatch_create(LR_NAT_RUN_STOPWATCH_NAME, SW_MS); - stopwatch_create(LR_STATEFUL_RUN_STOPWATCH_NAME, SW_MS); - stopwatch_create(LS_STATEFUL_RUN_STOPWATCH_NAME, SW_MS); - stopwatch_create(LS_ARP_RUN_STOPWATCH_NAME, SW_MS); - stopwatch_create(ADVERTISED_ROUTE_SYNC_RUN_STOPWATCH_NAME, SW_MS); - stopwatch_create(LEARNED_ROUTE_SYNC_RUN_STOPWATCH_NAME, SW_MS); - stopwatch_create(DYNAMIC_ROUTES_RUN_STOPWATCH_NAME, SW_MS); - stopwatch_create(GROUP_ECMP_ROUTE_RUN_STOPWATCH_NAME, SW_MS); /* Initialize incremental processing engine for ovn-northd */ inc_proc_northd_init(&ovnnb_idl_loop, &ovnsb_idl_loop); diff --git a/tests/perf-northd.at b/tests/perf-northd.at index 25c5c8ba4..0e9253b4b 100644 --- a/tests/perf-northd.at +++ b/tests/perf-northd.at @@ -85,18 +85,18 @@ m4_define([PERF_RECORD_STOPWATCH], [ # Append a number of metrics to performance results # m4_define([PERF_RECORD_STOP], [ - PERF_RECORD_STOPWATCH(ovnnb_db_run, ["Maximum"], [Maximum (NB in msec)]) - PERF_RECORD_STOPWATCH(ovnnb_db_run, ["Short term average"], [Average (NB in msec)]) - PERF_RECORD_STOPWATCH(ovnsb_db_run, ["Maximum"], [Maximum (SB in msec)]) - PERF_RECORD_STOPWATCH(ovnsb_db_run, ["Short term average"], [Average (SB in msec)]) + PERF_RECORD_STOPWATCH(northd, ["Maximum"], [Maximum (NB in msec)]) + PERF_RECORD_STOPWATCH(northd, ["Short term average"], [Average (NB in msec)]) + PERF_RECORD_STOPWATCH(sync_from_sb, ["Maximum"], [Maximum (SB in msec)]) + PERF_RECORD_STOPWATCH(sync_from_sb, ["Short term average"], [Average (SB in msec)]) PERF_RECORD_STOPWATCH(ovn-northd-loop, ["Maximum"], [Maximum (northd-loop in msec)]) PERF_RECORD_STOPWATCH(ovn-northd-loop, ["Short term average"], [Average (northd-loop in msec)]) - PERF_RECORD_STOPWATCH(build_lflows, ["Maximum"], [Maximum (lflows in msec)]) - PERF_RECORD_STOPWATCH(build_lflows, ["Short term average"], [Average (lflows in msec)]) - PERF_RECORD_STOPWATCH(port_group_run, ["Maximum"], [Maximum (port_group in msec)]) - PERF_RECORD_STOPWATCH(port_group_run, ["Short term average"], [Average (port_group in msec)]) - PERF_RECORD_STOPWATCH(sync_meters_run, ["Maximum"], [Maximum (sync_meters in msec)]) - PERF_RECORD_STOPWATCH(sync_meters_run, ["Short term average"], [Average (sync_meters in msec)]) + PERF_RECORD_STOPWATCH(lflow, ["Maximum"], [Maximum (lflows in msec)]) + PERF_RECORD_STOPWATCH(lflow, ["Short term average"], [Average (lflows in msec)]) + PERF_RECORD_STOPWATCH(port_group, ["Maximum"], [Maximum (port_group in msec)]) + PERF_RECORD_STOPWATCH(port_group, ["Short term average"], [Average (port_group in msec)]) + PERF_RECORD_STOPWATCH(sync_meters, ["Maximum"], [Maximum (sync_meters in msec)]) + PERF_RECORD_STOPWATCH(sync_meters, ["Short term average"], [Average (sync_meters in msec)]) ovn-appctl -t northd/ovn-northd stopwatch/reset ]) -- 2.51.1 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
