X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2Fjumpavg%2Favg_stdev_stats.py;fp=resources%2Flibraries%2Fpython%2Fjumpavg%2Favg_stdev_stats.py;h=c21c50c8f8493e2f9f04e4ebaa1b40d7a59d670d;hp=3d6a834919238b7e501ec8d510d785453b5bd94b;hb=455bd62382842c10b5c39c343554f7f40e47ebeb;hpb=bb328b99e6806f75ab967a97e89391377a317c03 diff --git a/resources/libraries/python/jumpavg/avg_stdev_stats.py b/resources/libraries/python/jumpavg/avg_stdev_stats.py index 3d6a834919..c21c50c8f8 100644 --- a/resources/libraries/python/jumpavg/avg_stdev_stats.py +++ b/resources/libraries/python/jumpavg/avg_stdev_stats.py @@ -1,4 +1,4 @@ -# Copyright (c) 2023 Cisco and/or its affiliates. +# Copyright (c) 2024 Cisco and/or its affiliates. # 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: @@ -73,6 +73,8 @@ class AvgStdevStats: run_size = run.size run_avg = run.avg run_stdev = run.stdev + if run_size < 1: + continue old_total_size = total_size delta = run_avg - total_avg total_size += run_size