You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ne...@apache.org on 2011/10/17 16:28:09 UTC
svn commit: r1185204 - in /subversion/trunk/tools/dev/benchmarks/suite1:
benchmark.py run
Author: neels
Date: Mon Oct 17 14:28:09 2011
New Revision: 1185204
URL: http://svn.apache.org/viewvc?rev=1185204&view=rev
Log:
Tweak benchmark suite1 for easier result reading.
* tools/dev/benchmarks/suite1/benchmark.py: Less verbosity by default.
* tools/dev/benchmarks/suite1/run: Show overall results first, then add detail.
Modified:
subversion/trunk/tools/dev/benchmarks/suite1/benchmark.py
subversion/trunk/tools/dev/benchmarks/suite1/run
Modified: subversion/trunk/tools/dev/benchmarks/suite1/benchmark.py
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/dev/benchmarks/suite1/benchmark.py?rev=1185204&r1=1185203&r2=1185204&view=diff
==============================================================================
--- subversion/trunk/tools/dev/benchmarks/suite1/benchmark.py (original)
+++ subversion/trunk/tools/dev/benchmarks/suite1/benchmark.py Mon Oct 17 14:28:09 2011
@@ -141,7 +141,7 @@ class Timings:
return '\n'.join(s)
- def compare_to(self, other):
+ def compare_to(self, other, verbose):
def do_div(a, b):
if b:
return float(a) / float(b)
@@ -170,7 +170,10 @@ class Timings:
% (' ' * len(TOTAL_RUN), selftotal, selfname))
- s.append(' min max avg operation')
+ if not verbose:
+ s.append(' avg operation')
+ else:
+ s.append(' min max avg operation')
names = sorted(self.timings.keys())
@@ -182,23 +185,18 @@ class Timings:
min_me, max_me, avg_me = self.min_max_avg(name)
min_other, max_other, avg_other = other.min_max_avg(name)
- s.append('%-16s %-16s %-16s %s' % (
- '%7.2f|%+7.3f' % (
- do_div(min_me, min_other),
- do_diff(min_me, min_other)
- ),
-
- '%7.2f|%+7.3f' % (
- do_div(max_me, max_other),
- do_diff(max_me, max_other)
- ),
-
- '%7.2f|%+7.3f' % (
- do_div(avg_me, avg_other),
- do_diff(avg_me, avg_other)
- ),
+ avg_str = '%7.2f|%+7.3f' % (do_div(avg_me, avg_other),
+ do_diff(avg_me, avg_other))
- name))
+ if not verbose:
+ s.append('%-16s %s' % (avg_str, name))
+ else:
+ min_str = '%7.2f|%+7.3f' % (do_div(min_me, min_other),
+ do_diff(min_me, min_other))
+ max_str = '%7.2f|%+7.3f' % (do_div(max_me, max_other),
+ do_diff(max_me, max_other))
+
+ s.append('%-16s %-16s %-16s %s' % (min_str, max_str, avg_str, name))
s.extend([
'(legend: "1.23|+0.45" means: slower by factor 1.23 and by 0.45 seconds;',
@@ -550,11 +548,12 @@ def cmd_compare(path1, path2):
t1 = read_from_file(path1)
t2 = read_from_file(path2)
- print t1.summary()
- print '---'
- print t2.summary()
- print '---'
- print t2.compare_to(t1)
+ if options.verbose:
+ print t1.summary()
+ print '---'
+ print t2.summary()
+ print '---'
+ print t2.compare_to(t1, options.verbose)
def cmd_combine(dest, *paths):
total = Timings('--version');
Modified: subversion/trunk/tools/dev/benchmarks/suite1/run
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/dev/benchmarks/suite1/run?rev=1185204&r1=1185203&r2=1185204&view=diff
==============================================================================
--- subversion/trunk/tools/dev/benchmarks/suite1/run (original)
+++ subversion/trunk/tools/dev/benchmarks/suite1/run Mon Oct 17 14:28:09 2011
@@ -44,13 +44,8 @@ batch(){
spread="$2"
N="$3"
pre="${levels}x${spread}_"
- echo
- echo "---------------------------------------------------------------------"
- echo
- echo "Results for dir levels: $levels spread: $spread"
"$benchmark" "--svn=$SVN_A" run "${pre}$SVN_A_NAME" $levels $spread $N >/dev/null
"$benchmark" "--svn=$SVN_B" run "${pre}$SVN_B_NAME" $levels $spread $N >/dev/null
- "$benchmark" compare "${pre}$SVN_A_NAME" "${pre}$SVN_B_NAME"
}
N=6
@@ -75,22 +70,44 @@ cs=100
{
started="$(date)"
echo "Started at $started"
-echo ""
batch $al $as $N
batch $bl $bs $N
batch $cl $cs $N
-echo ""
-echo =========================================================================
-echo ""
"$benchmark" combine "total_$SVN_A_NAME" *x*"_$SVN_A_NAME" >/dev/null
"$benchmark" combine "total_$SVN_B_NAME" *x*"_$SVN_B_NAME" >/dev/null
-echo "comparing averaged totals..."
+echo ""
+echo "Averaged-total results across all runs:"
+echo "---------------------------------------"
+echo ""
"$benchmark" compare "total_$SVN_A_NAME" "total_$SVN_B_NAME"
echo ""
+echo ""
+echo "Above totals split into separate <dir-levels>x<dir-spread> runs:"
+echo "----------------------------------------------------------------"
+echo ""
+
+for pre in "${al}x${as}_" "${bl}x${bs}_" "${cl}x${cs}_"; do
+ "$benchmark" compare "${pre}$SVN_A_NAME" "${pre}$SVN_B_NAME"
+ echo ""
+done
+
+echo ""
+echo ""
+echo "More detail:"
+echo "------------"
+echo ""
+
+for pre in "${al}x${as}_" "${bl}x${bs}_" "${cl}x${cs}_" "total_"; do
+ "$benchmark" compare -v "${pre}$SVN_A_NAME" "${pre}$SVN_B_NAME"
+ echo ""
+ echo ""
+done
+
+echo ""
echo "Had started at $started,"
echo " done at $(date)"
pwd