File: parse.py

package info (click to toggle)
haskell-aeson 0.6.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 616 kB
  • sloc: haskell: 2,447; python: 67; makefile: 15
file content (15 lines) | stat: -rwxr-xr-x 281 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env python

import json, sys, time

count = int(sys.argv[1])

for n in sys.argv[2:]:
    print '%s:' % n
    start = time.time()
    fp = open(n)
    for i in xrange(count):
        fp.seek(0)
        val = json.load(fp)
    end = time.time()
    print ' ', end - start