Changeset b2356837 in rtems
- Timestamp:
- Sep 5, 2014, 6:24:52 AM (6 years ago)
- Branches:
- 4.11, 5, master
- Children:
- 133962b
- Parents:
- 960c9f0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
testsuites/tmtests/tmcontext01/plot.py
r960c9f0 rb2356837 13 13 ctx = doc.xpathNewContext() 14 14 15 def plot(y): 15 colors = ['k', 'r', 'b', 'g', 'y', 'm'] 16 17 def plot(y, color, label, first): 16 18 n=len(y) 17 19 x=range(0, n) 18 plt.plot(x, y) 20 if first: 21 plt.plot(x, y, color=color, label=label) 22 else: 23 plt.plot(x, y, color=color) 19 24 20 25 plt.title("context switch timing test") … … 22 27 plt.ylabel('context switch time [ns]') 23 28 29 c = 0 24 30 for e in ["normal", "dirty"]: 31 first = True 25 32 for i in ["Min", "Q1", "Q2", "Q3", "Max"]: 26 33 y=map(xmlNode.getContent, ctx.xpathEval("/Test/ContextSwitchTest[@environment='" + e + "' and not(@load)]/Sample/" + i)) 27 plot(y) 28 load=1 34 plot(y, colors[c], e, first) 35 first = False 36 c = c + 1 37 load = 1 29 38 while load > 0: 39 first = True 30 40 for i in ["Min", "Q1", "Q2", "Q3", "Max"]: 31 41 y=map(xmlNode.getContent, ctx.xpathEval("/Test/ContextSwitchTest[@environment='dirty' and @load='" + str(load) + "']/Sample/" + i)) 32 42 if len(y) > 0: 33 plot(y )34 load = load + 143 plot(y, colors[c], "load " + str(load), first) 44 first = False 35 45 else: 36 46 load = 0 47 if load > 0: 48 load = load + 1 49 c = c + 1 50 plt.legend() 37 51 plt.show()
Note: See TracChangeset
for help on using the changeset viewer.