On Mon, Feb 20, 2012 at 10:52:59AM -0600, Andy Doan wrote:
Last Friday I thought up an idea that could piggy back the current android-benchmark plugin for LAVA that can allow people to create dynamic reports. I wanted to share the basic idea and code to see what people think.
Currently I define a benchmark report using the Django admin interface. I simply define a BenchmarkReport (which has a label like 2012.01) and then BenchmarkRuns which point to their BenchmarkReport and the bundle stream containing its runs.
You may reuse the now-abandoned code in django-reports (I'm the author of the upstream project). It has all the missing pieces you require. Basically the idea is that you (report author) defines how to configure your report and how to display a report given a configuration object. Then, django-reports handles the rest. It allows users to create new reports right from the web UI (not from the admin panel!), to name them, share them, etc. A basic permission system is also supplied so that users can create private or team owned reports.
The idea I had was to allow a user to specify all this information, have a view that creates these objects (but not commit them), and use the existing logic I have to create reports.
You'd need to implement a view (or form, I cannot recall now) and the rest would be automatic.
dynamic.png shows the current way the code allows you to create a dynamic report. dynamic-report.png shows what that report will then look like.
This basically looks like the UI from django-reports :-)
In its current form, its all done via an HTTP POST so you can't really share a link. I was thinking it could be cool to make an update to where the parameters were passed via HTTP GET parameters. You could then easily construct a URL to share with someone that could compare metrics between two or more bundle streams. ie - hey take a look at this "v8 javascript" comparison.
If you'd use django-reports then this part, and security/privacy, would be provided for free
I've included the minimal set of patches I did to make this work.
Aww, could you re-post as text, I'm trying to transition to mutt. git format-patches would be easier to read for me.
Comments/Thoughts/Suggestions?
I like your solution. I think that LAVA should empower people to do what they desire with data they collect. I'd love to foster a community of extension writers that can build sensible UI for various use cases.
Thanks Zygmunt