From 513a07abc0a06eea6bea417e20b3d4bc3a0d546f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 4 Mar 2021 19:39:15 +0100 Subject: Adding upstream version 2.4.2+debian. Signed-off-by: Daniel Baumann --- src/resperf-report | 112 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100755 src/resperf-report (limited to 'src/resperf-report') diff --git a/src/resperf-report b/src/resperf-report new file mode 100755 index 0000000..b3b7697 --- /dev/null +++ b/src/resperf-report @@ -0,0 +1,112 @@ +#!/bin/sh +# +# Copyright 2019-2021 OARC, Inc. +# Copyright 2017-2018 Akamai Technologies +# Copyright 2006-2016 Nominum, Inc. +# All rights reserved. +# +# 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. +# +# Driver script to run resperf and generate an HTML report of +# the results, with graphs. +# + +# Program locations - change these if not in $PATH +resperf=resperf +gnuplot=gnuplot + +# The gnuplot terminal type. This determines the image format for the +# plots; "png" or "gif" will both work as long as the corresponding +# terminal support is compiled into your copy of gnuplot. +terminal=png + +# Create a unique ID for this report +id=`date '+%Y%m%d-%H%M'` + +# Set up file names +reportfile="$id.html" +outputfile="$id.output" +plotfile="$id.gnuplot" +rate_graph="$id.rate.$terminal" +latency_graph="$id.latency.$terminal" + +# Run the test +$resperf -P "$plotfile" "$@" >"$outputfile" 2>&1 || + { echo "`basename $0`: error running resperf:" >&2; + cat $outputfile >&2; + exit 1; + } + +# Create plots + +if + $gnuplot <&2; exit 1; +fi + +if + $gnuplot <&2; exit 1; +fi + +# Generate the report + +exec >"$reportfile" + +cat < +

Resperf report $id

+

Resperf output

+
+EOF
+cat "$outputfile"
+cat <
+EOF
+
+cat <Plots
+

+ + +

+ +EOF + +echo "Done, report is in $reportfile" >&2 -- cgit v1.2.3