Skip to content

Commit

Permalink
Merge branch 'master' of github.com:tohojo/netperf-wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Täht committed Dec 10, 2012
2 parents 0ed0157 + 33c57a4 commit 4a8e612
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGES
@@ -1,3 +1,7 @@
2012-12-10: Fix spurious error when running netperf-wrapper with a test name
that is also an existing file name (that is, make the error message
intelligible).

2012-12-09: Automatically switch CDF plots to log scale if the median values
differ by more than an order of magnitude.

Expand Down
4 changes: 3 additions & 1 deletion netperf_wrapper/formatters.py
Expand Up @@ -339,7 +339,9 @@ def _do_cdf_plot(self, results, config=None, axis=None, postfix=""):
# More than an order of magnitude difference; switch to log scale
axis.set_xscale('log')
min_val = min(self.min_vals)
axis.set_xlim(left=min_val-min_val%10) # nearest value divisible by 10
if min_val > 10:
min_val -= min_val%10 # nearest value divisible by 10
axis.set_xlim(left=min_val)

def _do_meta_plot(self, results, postfix=""):
for i,config in enumerate(self.configs):
Expand Down
8 changes: 4 additions & 4 deletions netperf_wrapper/settings.py
Expand Up @@ -175,7 +175,10 @@ def load_test(self, test_name):
self.HOST = self.HOSTS[0]

test_env = TestEnvironment(self.__dict__)
s = test_env.execute(os.path.join(TEST_PATH, test_name + ".conf"))
filename = os.path.join(TEST_PATH, test_name + ".conf")
if not os.path.exists(filename):
raise RuntimeError("No config file found for test '%s'" % test_name)
s = test_env.execute(filename)

for k,v in list(s.items()):
if k == k.upper():
Expand Down Expand Up @@ -230,9 +233,6 @@ def load():

test_name = args[0]

if os.path.exists(test_name):
test_name = os.path.splitext(os.path.basename(test_file))[0]

settings.load_test(test_name)
results = [ResultSet(NAME=settings.NAME,
HOST=settings.HOST,
Expand Down

0 comments on commit 4a8e612

Please sign in to comment.