[rtems commit] smplock01: Fix plot scripts

Sebastian Huber sebh at rtems.org
Wed Dec 7 10:22:10 UTC 2016


Module:    rtems
Branch:    master
Commit:    ccda60bdb6b06ca47018ea6ac40bcdef954b8452
Changeset: http://git.rtems.org/rtems/commit/?id=ccda60bdb6b06ca47018ea6ac40bcdef954b8452

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Dec  7 11:21:28 2016 +0100

smplock01: Fix plot scripts

---

 testsuites/smptests/smplock01/smplock01fair.py | 5 +++--
 testsuites/smptests/smplock01/smplock01perf.py | 1 +
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/testsuites/smptests/smplock01/smplock01fair.py b/testsuites/smptests/smplock01/smplock01fair.py
index 2041a51..378dfd8 100755
--- a/testsuites/smptests/smplock01/smplock01fair.py
+++ b/testsuites/smptests/smplock01/smplock01fair.py
@@ -36,7 +36,7 @@ def normedCoefficientOfVariation(name, i):
 	y = map(m, ctx.xpathEval('/SMPLock01/' + name + '[@activeWorker=' + str(i) + ']/LocalCounter'))
 	if len(y) == 0:
 		raise
-	return (statistics.stdev(y) / statistics.mean(y)) / math.sqrt(len(y) - 1)
+	return (statistics.stdev(y) / statistics.mean(y)) / math.sqrt(len(y))
 
 try:
 	while True:
@@ -49,7 +49,8 @@ except:
 	pass
 
 x = range(2, len(ticket) + 2)
-plt.yscale('log')
+plt.xticks(x)
+plt.yscale('symlog', linthreshy = 1e-6)
 plt.plot(x, ticket, label = 'Ticket Lock', marker = 'o')
 plt.plot(x, mcs, label = 'MCS Lock', marker = 'o')
 plt.plot(x, tas, label = 'TAS Lock', marker = 'o')
diff --git a/testsuites/smptests/smplock01/smplock01perf.py b/testsuites/smptests/smplock01/smplock01perf.py
index 52db4d3..4381681 100755
--- a/testsuites/smptests/smplock01/smplock01perf.py
+++ b/testsuites/smptests/smplock01/smplock01perf.py
@@ -23,6 +23,7 @@ plt.ylabel('Operation Count')
 
 y = map(xmlNode.getContent, ctx.xpathEval('/SMPLock01/GlobalTicketLockWithLocalCounter/SumOfLocalCounter'))
 x = range(1, len(y) + 1)
+plt.xticks(x)
 plt.plot(x, y, label = 'Ticket Lock', marker = 'o')
 
 y = map(xmlNode.getContent, ctx.xpathEval('/SMPLock01/GlobalMCSLockWithLocalCounter/SumOfLocalCounter'))




More information about the vc mailing list