ofiwg/fabtests — pull request #65 by pmmccorm (2014-11-08 01:07:23+00:00)
Title: Machine readable output for simple tests.

Add a "-m" switch to output yaml:

$ ./simple/fi_msg_pingpong -m -d localhost
--- # ./simple/fi_msg_pingpong -m -d localhost
- { xfer_size: 64, iterations: 100000, total: 12800000, time: 2.545385, Gb/sec: 0.040230, usec/xfer: 12.726925 }
- { xfer_size: 96, iterations: 100000, total: 19200000, time: 2.544628, Gb/sec: 0.060362, usec/xfer: 12.723140 }
- { xfer_size: 192, iterations: 100000, total: 38400000, time: 2.547145, Gb/sec: 0.120606, usec/xfer: 12.735725 }
- { xfer_size: 4096, iterations: 10000, total: 81920000, time: 0.256034, Gb/sec: 2.559660, usec/xfer: 12.801700 }
- { xfer_size: 65536, iterations: 1000, total: 131072000, time: 0.076883, Gb/sec: 13.638594, usec/xfer: 38.441502 }
- { xfer_size: 1048576, iterations: 100, total: 209715200, time: 0.074230, Gb/sec: 22.601665, usec/xfer: 371.149994 }

This output can be concatenated:

$ ./simple/fi_msg_pingpong -m -d localhost > output1.yaml
$ ./simple/fi_msg_pingpong -m -d localhost > output2.yaml
$ cat output1.yaml output2.yaml > outputs.yaml

And parsed/verified with the parseyaml.py script. When given a filename it parses and prints the yaml returning 0 on success, non-zero on failure. When passed "-d" it prints the difference between two outputs:

# these two compute output2 - output1:
$ ./scripts/parseyaml.py -d output1.yaml output2.yaml
$ ./scripts/parseyaml.py -d outputs.yaml

[{'Gb/sec': -5.3999999999998494e-05,
'iterations': 100000,
'time': 0.0034229999999997318,
'total': 12800000,
'usec/xfer': 0.017114999999998659,
'xfer_size': 64},
{'Gb/sec': -0.00014200000000000323,
'iterations': 100000,
'time': 0.0059719999999998663,
'total': 19200000,
'usec/xfer': 0.029859999999999332,
'xfer_size': 96},
....

I have not thought too much about the output schema but these are the basics.