Skip to content

Commit cb08aeb

Browse files
committed
Add avg and stddev to csv files with initial #
1 parent 6f9270a commit cb08aeb

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

public/connping.rwl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# as shown at https://oss.oracle.com/licenses/upl/
66
#
77
# History
8+
# bengsig 23-feb-2023 - All add avg/std as comment to csvfile when not excel
89
# bengsig 9-feb-2023 - Ensure ociping is as correct as possible
910
# bengsig 5-sep-2022 - Min values were wrong
1011
# bengsig 9-aug-2022 - Timestamp as unixepoch or full time, min/max printed
@@ -259,6 +260,14 @@ end run;
259260

260261
# Print final results
261262
if csvoutput != "" then
263+
if ! csvexcel then
264+
fprintf csvfile, "# connect mean=%.2f, stddev=%.2f, min=%.2f, max=%.2f\n"
265+
, t0sum/t0cnt, sqrt((t0sq-t0sum*t0sum/t0cnt)/t0cnt), cmin, cmax;
266+
fprintf csvfile, "# ociping mean=%.2f, stddev=%.2f, min=%.2f, max=%.2f\n"
267+
, tsum/tcnt, sqrt((tsq-tsum*tsum/tcnt)/tcnt), omin, omax;
268+
fprintf csvfile, "# dualping mean=%.2f, stddev=%.2f, min=%.2f, max=%.2f\n"
269+
, tdsum/tdcnt, sqrt((tdsq-tdsum*tdsum/tdcnt)/tdcnt), qmin, qmax;
270+
end if;
262271
csvfile := null;
263272
end if;
264273

public/ociping.rwl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# as shown at https://oss.oracle.com/licenses/upl/
66
#
77
# History
8+
# bengsig 23-feb-2023 - All add avg/std as comment to csvfile when not excel
89
# bengsig 9-feb-2023 - Ensure ociping is as correct as possible
910
# bengsig 10-aug-2022 - improve output, csv, excel
1011
# bengsig 29-jun-2022 - Generate project
@@ -195,6 +196,10 @@ end loop;
195196

196197
# Print final results
197198
if csvoutput != "" then
199+
if ! csvexcel then
200+
fprintf csvfile, "#ociping (ms) mean=%.3f, stddev=%.3f, min=%.3f, max=%.3f\n"
201+
,tsum/tcnt,sqrt((tsq-tsum*tsum/tcnt)/tcnt), tmin, tmax;
202+
end if;
198203
csvfile := null;
199204
end if;
200205
printf "ociping (ms) mean=%.3f, stddev=%.3f, min=%.3f, max=%.3f\n"

0 commit comments

Comments
 (0)