source: rtems/testsuites/tmtests/tmtimer01/plot.py @ 16f3f10

5
Last change on this file since 16f3f10 was f831eff, checked in by Sebastian Huber <sebastian.huber@…>, on 03/02/16 at 07:07:58

tmtests/tmtimer01: New test

Test run performed on T4240 running at 1667MHz in uni-processor
configuration.

Update #2554.

  • Property mode set to 100644
File size: 730 bytes
Line 
1#
2# Copyright (c) 2016 embedded brains GmbH.  All rights reserved.
3#
4# The license and distribution terms for this file may be
5# found in the file LICENSE in this distribution or at
6# http://www.rtems.org/license/LICENSE.
7#
8
9import libxml2
10from libxml2 import xmlNode
11import matplotlib.pyplot as plt
12doc = libxml2.parseFile('tmtimer01.scn')
13ctx = doc.xpathNewContext()
14
15plt.title('timer test')
16plt.xscale('log')
17plt.xlabel('active timers')
18plt.ylabel('timer fire and cancel [ns]')
19
20x = map(xmlNode.getContent, ctx.xpathEval('/TMTimer01/Sample/ActiveTimers'))
21for i in ['First', 'Middle', 'Last']:
22        y = map(xmlNode.getContent, ctx.xpathEval('/TMTimer01/Sample/' + i))
23        plt.plot(x, y, label = i)
24plt.legend(loc = 'best')
25plt.show()
Note: See TracBrowser for help on using the repository browser.