Created
August 21, 2015 15:11
-
-
Save dantleech/0b61b1d14443a7f7b4dd to your computer and use it in GitHub Desktop.
Tabular configuration for generating tables/reports from XML document
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "classes": { | |
| "deviation": [ | |
| [ "printf", { "format": "%.2f%%" } ], | |
| [ "balance" ] | |
| ], | |
| "memory": [ | |
| [ "printf", { "format": "%d<comment>b</comment>" }] | |
| ], | |
| "rps": [ | |
| [ "number", { "decimal_places": 2 }], | |
| [ "printf", { "format": "%s<comment>rps</comment>" }] | |
| ], | |
| "time": [ | |
| [ "number", { "decimal_places": 2 }], | |
| [ "printf", { "format": "%s<comment>\u03bcs</comment>" }] | |
| ] | |
| }, | |
| "rows": [ | |
| { | |
| "cells": { | |
| "benchmark": { | |
| "expr": "class_name(string(ancestor-or-self::benchmark/@class))" | |
| }, | |
| "subject": { | |
| "expr": "string(ancestor-or-self::subject/@name)" | |
| }, | |
| "group": { | |
| "expr": "string(ancestor-or-self::group/@name)" | |
| }, | |
| "params": { | |
| "expr": "parameters_to_json(ancestor-or-self::variant/parameter)" | |
| }, | |
| "revs": { | |
| "expr": "number(descendant-or-self::iteration/@revs)" | |
| }, | |
| "iter": { | |
| "expr": "count(descendant-or-self::iteration/preceding-sibling::*)" | |
| }, | |
| "time": { | |
| "class": "time", | |
| "expr": "number(descendant-or-self::iteration/@time) div sum(descendant-or-self::iteration/@revs)" | |
| }, | |
| "time_net": { | |
| "class": "time", | |
| "expr": "number(descendant-or-self::iteration/@time)" | |
| }, | |
| "memory": { | |
| "class": "memory", | |
| "expr": "number(descendant-or-self::iteration/@memory)" | |
| }, | |
| "rps": { | |
| "class": "rps", | |
| "expr": "(1000000 div number(descendant-or-self::iteration//@time)) * number(descendant-or-self::iteration/@revs)" | |
| }, | |
| "deviation": { | |
| "class": "deviation", | |
| "expr": "deviation(min(//@time), number(descendant-or-self::iteration/@time))" | |
| } | |
| }, | |
| "with_query": "//iteration" | |
| }, | |
| { | |
| "cells": { | |
| "deviation": { | |
| "literal": "<info><< {{ row.item }}</info>" | |
| }, | |
| "{{ cell.item }}": { | |
| "literal": "<comment>--</comment>", | |
| "with_items": [ | |
| "benchmark", | |
| "subject", | |
| "group", | |
| "params", | |
| "iter" | |
| ] | |
| }, | |
| "{{ cell.col }}": { | |
| "expr": "{{ row.item }}(//group[@name=\"_default\"]//cell[@name=\"{{ cell.col }}\"])", | |
| "pass": 1, | |
| "class": "{{ cell.class }}", | |
| "with_items": [ | |
| { | |
| "col": "memory", | |
| "class": "memory" | |
| }, | |
| { | |
| "col": "revs", | |
| "class": null | |
| }, | |
| { | |
| "col": "time", | |
| "class": "time" | |
| }, | |
| { | |
| "col": "time_net", | |
| "class": "time" | |
| }, | |
| { | |
| "col": "rps", | |
| "class": "rps" | |
| } | |
| ] | |
| } | |
| }, | |
| "group": "footer", | |
| "with_items": [ "average" ] | |
| } | |
| ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment