From b472d03f4f025d9bab17b8b200d108777e14bf47 Mon Sep 17 00:00:00 2001 From: Webb Scales <7795764+webbnh@users.noreply.github.com> Date: Wed, 14 Sep 2022 14:10:33 -0400 Subject: [PATCH] Remove the now unused pbench-avg-stddev (perl) script (#3004) PBENCH-22 --- agent/Makefile | 1 - agent/util-scripts/pbench-avg-stddev | 43 ---------------------------- docs/gh-pages/doc.html | 1 - docs/guides/UserGuide.rst | 1 - 4 files changed, 46 deletions(-) delete mode 100755 agent/util-scripts/pbench-avg-stddev diff --git a/agent/Makefile b/agent/Makefile index 707e0a7fb0..7ebfbd715e 100644 --- a/agent/Makefile +++ b/agent/Makefile @@ -23,7 +23,6 @@ INSTALLOPTS = --directory util-scripts = \ get-internal-tool \ pbench-add-metalog-option \ - pbench-avg-stddev \ pbench-copy-results \ pbench-copy-result-tb \ pbench-display-sysinfo-options \ diff --git a/agent/util-scripts/pbench-avg-stddev b/agent/util-scripts/pbench-avg-stddev deleted file mode 100755 index c1f87e9a88..0000000000 --- a/agent/util-scripts/pbench-avg-stddev +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/perl -# -# input: a bunch of numbers on cmd line -# output: an average (mean), sample standard deviation, sample standard deviation percent, and which input was closest to the avgerage -# - -my $sum = 0; -my $count = @ARGV; -if ($count == 1) { - printf "%.4f %.4f %.4f %d\n", $ARGV[0], 0, 0, 1; -} elsif ($count == 0) { - printf "%.4f %.4f %.4f %d\n", $ARGV[0], 0, 0, 0; -} else { - foreach $val (@ARGV) { - $sum += $val; - } - $avg = $sum / $count; - - $index = 1; - foreach $val (@ARGV) { - $sqdiff = ($avg - $val)**2; - - # keep track of the value which has the least difference from the average - if (!defined $closest_index) { - $mindiff = $sqdiff; - $closest_index = $index; - } - elsif ( $sqdiff < $mindiff ) { - $mindiff = $sqdiff; - $closest_index = $index; - } - $totalsqdiff += $sqdiff; - $index++; - } - my $stddev = ($totalsqdiff / ($#ARGV)) ** 0.5; - # if $stddev is 0 and the avgerage is 0, then return 0 for $stddevpct (do not divide by zero below) - if (($stddev == 0) && ($avg == 0)) { - $stddevpct = 0; - } else { - $stddevpct = 100 * $stddev / $avg; - } - printf "%.4f %.4f %.4f %d\n", $avg, $stddev, $stddevpct, $closest_index; -} diff --git a/docs/gh-pages/doc.html b/docs/gh-pages/doc.html index bd545ac7ad..c7e1f970fd 100644 --- a/docs/gh-pages/doc.html +++ b/docs/gh-pages/doc.html @@ -650,7 +650,6 @@ want more information on these, you will have to read the code:
diff --git a/docs/guides/UserGuide.rst b/docs/guides/UserGuide.rst
index dbd64c37c5..b358d03953 100644
--- a/docs/guides/UserGuide.rst
+++ b/docs/guides/UserGuide.rst
@@ -306,7 +306,6 @@ do?) in `FAQ section