File: megatime.py

package info (click to toggle)
python-mitogen 0.3.26-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 6,456 kB
  • sloc: python: 22,134; sh: 183; makefile: 74; perl: 19; ansic: 18
file content (18 lines) | stat: -rwxr-xr-x 357 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env python

import sys
import os

import mitogen.core


times = []
for x in range(5):
    t0 = mitogen.core.now()
    os.spawnvp(os.P_WAIT, sys.argv[1], sys.argv[1:])
    t = mitogen.core.now() - t0
    times.append(t)
    print('+++', t)

print('all:', times)
print('min %s max %s diff %s' % (min(times), max(times), (max(times) - min(times))))