diff options
| author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2008-05-22 23:08:08 -0400 |
|---|---|---|
| committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2008-05-22 23:08:08 -0400 |
| commit | 50c61e6578f0d3196f0c5bad708be376a6d0ce4e (patch) | |
| tree | 404ae0b4810362afec14046847edc3d905dd3dbf | |
| parent | 0d160666ce092caf6505884867c588a991e55c2d (diff) | |
CSV support for stats, some formatting fixes
| -rwxr-xr-x | analyze | 7 |
1 files changed, 5 insertions, 2 deletions
| @@ -65,9 +65,12 @@ def do_range(f): | |||
| 65 | xtra = ' (%d of %d samples)' % (s[2], s[3]) | 65 | xtra = ' (%d of %d samples)' % (s[2], s[3]) |
| 66 | else: | 66 | else: |
| 67 | xtra = '' | 67 | xtra = '' |
| 68 | print 'avg=%5.2f max=%5.2f -- %s%s' % (a, m, f, xtra) | 68 | if options.csv: |
| 69 | print '"%s%s", %f, %f' % (f, xtra, a, m) | ||
| 70 | else: | ||
| 71 | print 'avg=%6.2f max=%6.2f -- %s%s' % (a, m, f, xtra) | ||
| 69 | elif not options.ignore_empty: | 72 | elif not options.ignore_empty: |
| 70 | print 'Empty. -- %s ' % (f) | 73 | print 'Empty. -- %s ' % (f) |
| 71 | 74 | ||
| 72 | def do_dist(f): | 75 | def do_dist(f): |
| 73 | s = datafile.dist(f, 1.0 - options.discard / 100.0, | 76 | s = datafile.dist(f, 1.0 - options.discard / 100.0, |
