Attached is a large patch for a powerful and flexible new graphing system for new TKO.  This system subsumes all the previous kernel graphing scripts under the tko/ directory and is capable of much more.  These wiki pages document usage of the new system and give an idea of what it's capable of:

http://autotest.kernel.org/wiki/MetricsPlot
http://autotest.kernel.org/wiki/MachineQualHistograms

Feel free to try it out and please let us know if you run into any trouble.

This system is the work of our summer intern James Ren.  Thank you for all your fantastic work, James!

From: James Ren <jamesren@stanford.edu>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2171 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/tko/migrations/017_add_embedded_graph_caching.py b/tko/migrations/017_add_embedded_graph_caching.py
new file mode 100644
index 0000000..bee7471
--- /dev/null
+++ b/tko/migrations/017_add_embedded_graph_caching.py
@@ -0,0 +1,33 @@
+def migrate_up(manager):
+    manager.execute_script(ADD_COLUMNS)
+
+def migrate_down(manager):
+    manager.execute_script(DROP_COLUMNS)
+
+ADD_COLUMNS = """\
+DELETE FROM embedded_graphing_queries;
+
+ALTER TABLE embedded_graphing_queries
+DROP COLUMN last_accessed;
+
+ALTER TABLE embedded_graphing_queries
+ADD COLUMN (
+    last_updated DATETIME NOT NULL,
+    refresh_time DATETIME DEFAULT NULL,
+    cached_png MEDIUMBLOB
+);
+"""
+
+DROP_COLUMNS = """\
+ALTER TABLE embedded_graphing_queries
+DROP COLUMN last_updated;
+
+ALTER TABLE embedded_graphing_queries
+DROP COLUMN cached_png;
+
+ALTER TABLE embedded_graphing_queries
+DROP COLUMN refresh_time;
+
+ALTER TABLE embedded_graphing_queries
+ADD COLUMN (last_accessed DATETIME NOT NULL);
+"""