On 6/30/21 3:15 PM, Mark Gray wrote:
> For performance measurement, it is useful to understand the
> length of time required to complete a number of key code paths
> in ovn-northd.c. Add stopwatches to measure these timings.
> 
> Signed-off-by: Mark Gray <mark.d.g...@redhat.com>
> Acked-by: Dumitru Ceara <dce...@redhat.com>
> ---
> 
> Notes:
>     v4:  Add common header file for stopwatch names
>     v5:  Forgot to `git add` a new file. Added this file.
> 
>  lib/automake.mk           |  3 ++-
>  lib/stopwatch-names.h     | 25 +++++++++++++++++++++++++
>  northd/ovn-northd-ddlog.c | 12 ++++++++++++
>  northd/ovn-northd.c       | 17 +++++++++++++++++
>  4 files changed, 56 insertions(+), 1 deletion(-)
>  create mode 100644 lib/stopwatch-names.h
> 
> diff --git a/lib/automake.mk b/lib/automake.mk
> index 917b28e1edf7..f668b791bb81 100644
> --- a/lib/automake.mk
> +++ b/lib/automake.mk
> @@ -29,7 +29,8 @@ lib_libovn_la_SOURCES = \
>       lib/inc-proc-eng.c \
>       lib/inc-proc-eng.h \
>       lib/lb.c \
> -     lib/lb.h
> +     lib/lb.h \
> +     lib/stopwatch-names.h
>  nodist_lib_libovn_la_SOURCES = \
>       lib/ovn-dirs.c \
>       lib/ovn-nb-idl.c \
> diff --git a/lib/stopwatch-names.h b/lib/stopwatch-names.h
> new file mode 100644
> index 000000000000..06b20272e8cf
> --- /dev/null
> +++ b/lib/stopwatch-names.h
> @@ -0,0 +1,25 @@
> +/* Copyright (c) 2021 Red Hat, Inc.
> + *
> + * Licensed under the Apache License, Version 2.0 (the "License");
> + * you may not use this file except in compliance with the License.
> + * You may obtain a copy of the License at:
> + *
> + *     http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing, software
> + * distributed under the License is distributed on an "AS IS" BASIS,
> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> + * See the License for the specific language governing permissions and
> + * limitations under the License.
> + */
> +#ifndef STOPWATCH_NAMES_H
> +#define STOPWATCH_NAMES_H 1
> +
> +/* In order to not duplicate names for stopwatches between ddlog and 
> non-ddlog
> + * we define them in a common header file.
> + */
> +#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"
> +
> +#endif
> \ No newline at end of file

No newline at end of file.  With this addressed:

Acked-by: Dumitru Ceara <dce...@redhat.com>

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to