[go: up one dir, main page]

File: t106_report_time.py

package info (click to toggle)
uftrace 0.13-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 5,212 kB
  • sloc: ansic: 53,313; python: 9,846; makefile: 838; asm: 703; cpp: 602; sh: 560; javascript: 191
file content (22 lines) | stat: -rw-r--r-- 630 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env python

from runtest import TestBase

class TestCase(TestBase):
    def __init__(self):
        TestBase.__init__(self, 'sleep', """
  Total time   Self time       Calls  Function
  ==========  ==========  ==========  ====================================
    2.103 ms    0.910 us           1  main
    2.102 ms   18.787 us           1  foo
    2.084 ms    4.107 us           1  bar
    2.080 ms    2.080 ms           1  usleep
""", sort='report')

    def prepare(self):
        self.subcmd = 'record'
        return self.runcmd()

    def setup(self):
        self.subcmd = 'report'
        self.option = '-t 1ms'