~ps10gel/ubuntu/xenial/trafficserver/6.2.0

« back to all changes in this revision

Viewing changes to test/SDKtest/client/benchmark-o-matic

  • Committer: Bazaar Package Importer
  • Author(s): Arno Toell
  • Date: 2011-01-13 11:49:18 UTC
  • Revision ID: james.westby@ubuntu.com-20110113114918-vu422h8dknrgkj15
Tags: upstream-2.1.5-unstable
ImportĀ upstreamĀ versionĀ 2.1.5-unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
#
 
3
#  Licensed to the Apache Software Foundation (ASF) under one
 
4
#  or more contributor license agreements.  See the NOTICE file
 
5
#  distributed with this work for additional information
 
6
#  regarding copyright ownership.  The ASF licenses this file
 
7
#  to you under the Apache License, Version 2.0 (the
 
8
#  "License"); you may not use this file except in compliance
 
9
#  with the License.  You may obtain a copy of the License at
 
10
#
 
11
#      http://www.apache.org/licenses/LICENSE-2.0
 
12
#
 
13
#  Unless required by applicable law or agreed to in writing, software
 
14
#  distributed under the License is distributed on an "AS IS" BASIS,
 
15
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
16
#  See the License for the specific language governing permissions and
 
17
#  limitations under the License.
 
18
#
 
19
#  function usage: GetResult metric directory
 
20
#                  result return in $value
 
21
GetResult () {
 
22
#
 
23
#  combined result is in 3rd to last comma-separated column
 
24
  value=`grep "$1" $2/summary.csv | awk -F, '{print $(NF-2);}'`
 
25
}
 
26
 
 
27
summary=Results.all.$$
 
28
 
 
29
 
 
30
for hitrate in 0 20 40 60 80 100 ; do
 
31
  out=output/hitrate.$hitrate
 
32
  inkbench hitrate=$hitrate output=$out
 
33
  GetResult 'Cumulative rate' $out
 
34
  echo "Hitrate: $hitrate   Op/sec: $value" >> $summary
 
35
  echo ""
 
36
  echo "Results so far:"
 
37
  cat $summary
 
38
  echo ""
 
39
done
 
40
 
 
41
echo "" >> $summary
 
42
 
 
43
for users in 100 200 500 1000 2000 5000 10000 ; do
 
44
  out=output/users.$users
 
45
  inkbench users=$users output=$out
 
46
  GetResult 'Cumulative rate' $out
 
47
  echo "Users: $users   Op/sec: $value" >> $summary
 
48
  echo ""
 
49
  echo "Results so far:"
 
50
  cat $summary
 
51
  echo ""
 
52
done
 
53
 
 
54
echo "" >> $summary
 
55
 
 
56
for hotset in 100 1000 10000 50000 100000 ; do
 
57
  out=output/hotset.$hotset
 
58
  inkbench hotset=$hotset output=$out
 
59
  GetResult 'Cumulative rate' $out
 
60
  echo "Hotset: $hotset   Op/sec: $value" >> $summary
 
61
  echo ""
 
62
  echo "Results so far:"
 
63
  cat $summary
 
64
  echo ""
 
65
done