I'm currently using Perl to do performance test coordination to benchmark various aspects of a system. The typical cycle is to identify something that you want to generate a scatter graph for (i.e. X/Y plot), and then the items on the X and Y axes. For example "messages per second" on Y, and "processing units" on X. The test coordinator will execute a sequence of tests, incrementing the X value for each test run. Each test run generates a new plot point (X,Y value). This is actually a slight simplification as each test run generates many (X,Y) values, but for different system aspects. For example for a given X we would get both "messages per second" and "cpu utilization of server app".
The desired end product of this process is a nice looking graph somewhere (e.g. web page).
At the end of the test run process I have a bunch of single line entries in a logfile which are the test results. I then have to go through an annoying time consuming process to put these in MS excel, and make graphs. Obviously there are a plethora of much better solutions than this.
Thinking a bit outside the obvious desire to "automate things", it would be nice to have all of the data from these important tests nicely encapsulated and self-describing in a text file. That way it doesn't become a "junk file" on some computer. Another important aspect would be having something that could ingest this data, and given suitable graphing metadata, transform this into a graph, or, in my particular case, transform it into javascript which will render it on a web page (when hooked up to a suitable graph package, like YUI). Thus, I'm looking at this as a classic data representation and transformation problem (for which Perl is perfectly suitable).
My thought was to have a file format that encapsulated a single "test run". The file format would be text, and self-describing. It would have metadata to describe the conditions of the test (e.g. title, hardware, whatever), as well as the data from successive runs. Using this file as input, we would have some sort of additional specification to generate a graph which would have to select the columns and range, as well as handle things like multiple graph plots, etc. The target output rendering would be (*gasp*) javascript, which would be an encapsulated json data object inside a web page presented by some graph package (Yahoo has a nice one that is being developed by their YUI group).
Thus I'm really not necessarily interested in the graphing portion of things (since there are probably many solutions to this old part), but more interested in the middle "transformation" part and the input file formats. The first input file format, as I described, is the test run data container, and the second input file format is the graph metadata container. Of course I'll be using Perl to implement and do all of the transformation work.
Note, I see XML as too heavyweight for such a simple thing.
Now that I've described what I'm after, I'm hoping that some of you will say "hey, that sounds kind of like xyz" (where xyz is the Perl library that does this sort of thing). Alternatively, identifying technology to handle pieces of the whole problem in a nice way is helpful (e.g. use YAML for the file formats so the file formats are generally useful outside of Perl). I could obviously write my own, but am guessing someone has solved this problem in a nice way already.
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |