diff options
| author | drebs <drebs@riseup.net> | 2017-06-21 09:23:03 -0300 | 
|---|---|---|
| committer | drebs <drebs@riseup.net> | 2017-06-21 09:23:03 -0300 | 
| commit | 89aa15112096356cc95871ec539aa739ca0c6c05 (patch) | |
| tree | 9feaa5f98b46c911dace2c5fa6500117b428fd3e | |
| parent | bfb03834ed5043f781dadcfd747087e5be30d3c3 (diff) | |
[elastic] remove x-axis labels
| -rwxr-xr-x | elastic/generate-config.py | 8 | ||||
| -rw-r--r-- | elastic/templates/visualization-visState-resources.mustache | 155 | ||||
| -rw-r--r-- | elastic/templates/visualization-visState-time.mustache | 191 | 
3 files changed, 270 insertions, 84 deletions
| diff --git a/elastic/generate-config.py b/elastic/generate-config.py index 88d6e82..45b7c35 100755 --- a/elastic/generate-config.py +++ b/elastic/generate-config.py @@ -49,19 +49,19 @@ def generate_visualizations(tests):              os.unlink(os.path.join(out_dir, f))      graphs = [ -        ('time', 'weasel', template_visState_time), -        ('resources', 'Beluga', template_visState_resources) +        ('time', 'Time taken by ', 'weasel', template_visState_time), +        ('resources', 'Resources consumed by ', 'Beluga', template_visState_resources)      ]      for test_name in tests: -        for type, host, template_visState in graphs: +        for type, title, host, template_visState in graphs:              out_file = os.path.join(out_dir, test_name + '_' + type + '.json')              logger.info('Generating ' + out_file)              context = { -               'title': test_name + "_" + type, +               'title': title + test_name,                 'test_name': test_name,                 'query': "commit_info.project:soledad "  #                        "AND commit_info.branch='master' " diff --git a/elastic/templates/visualization-visState-resources.mustache b/elastic/templates/visualization-visState-resources.mustache index d47db6b..53b008a 100644 --- a/elastic/templates/visualization-visState-resources.mustache +++ b/elastic/templates/visualization-visState-resources.mustache @@ -1,60 +1,141 @@  { -   "type" : "line", -   "listeners" : {}, -   "title" : "Test resources for {{{test_name}}}", -   "params" : { -      "legendPosition" : "right", -      "defaultYExtents" : false, -      "setYExtents" : false, -      "drawLinesBetweenPoints" : true, -      "interpolate" : "linear", -      "addTimeMarker" : false, -      "radiusRatio" : 9, -      "showCircles" : true, -      "scale" : "linear", -      "addTooltip" : true, -      "addLegend" : true, -      "times" : [] -   },     "aggs" : [        {           "type" : "avg", -         "schema" : "metric", +         "enabled" : true,           "params" : { -            "field" : "extra_info.cpu_percent" +            "field" : "extra_info.cpu_percent", +            "customLabel" : "CPU usage (%)"           }, -         "enabled" : true, +         "schema" : "metric",           "id" : "1"        },        { -         "enabled" : true,           "id" : "2", +         "schema" : "segment", +         "type" : "terms", +         "enabled" : true,           "params" : { -            "order" : "asc", -            "orderBy" : "custom", -            "field" : "commit_id_and_date", -            "size" : 1000,              "orderAgg" : { +               "id" : "2-orderAgg", +               "schema" : "orderAgg",                 "params" : {                    "field" : "commit_info.time"                 }, -               "schema" : "orderAgg",                 "type" : "min", -               "enabled" : true, -               "id" : "2-orderAgg" -            } -         }, -         "schema" : "segment", -         "type" : "terms" +               "enabled" : true +            }, +            "orderBy" : "custom", +            "customLabel" : "Commit info: id and date", +            "order" : "asc", +            "size" : 1000, +            "field" : "commit_id_and_date" +         }        },        { -         "enabled" : true, -         "id" : "3",           "schema" : "metric", +         "id" : "3",           "params" : { -            "field" : "extra_info.memory_percent.stats.max" +            "field" : "extra_info.memory_percent.stats.max", +            "customLabel" : "Memory usage (%)"           }, -         "type" : "avg" +         "type" : "avg", +         "enabled" : true        } -   ] +   ], +   "title" : "Resources used by {{{test_name}}}", +   "params" : { +      "valueAxes" : [ +         { +            "scale" : { +               "mode" : "normal", +               "type" : "linear" +            }, +            "position" : "left", +            "type" : "value", +            "title" : { +               "text" : "" +            }, +            "name" : "LeftAxis-1", +            "id" : "ValueAxis-1", +            "style" : {}, +            "labels" : { +               "show" : true, +               "filter" : false, +               "rotate" : 0, +               "truncate" : 100 +            }, +            "show" : true +         } +      ], +      "legendPosition" : "right", +      "seriesParams" : [ +         { +            "showCircles" : true, +            "type" : "line", +            "interpolate" : "linear", +            "data" : { +               "id" : "1", +               "label" : "CPU usage (%)" +            }, +            "drawLinesBetweenPoints" : true, +            "show" : true, +            "lineWidth" : 2, +            "valueAxis" : "ValueAxis-1", +            "mode" : "normal" +         }, +         { +            "showCircles" : true, +            "interpolate" : "linear", +            "type" : "line", +            "data" : { +               "label" : "Memory usage (%)", +               "id" : "3" +            }, +            "drawLinesBetweenPoints" : true, +            "show" : true, +            "mode" : "normal", +            "valueAxis" : "ValueAxis-1", +            "lineWidth" : 2 +         } +      ], +      "setYExtents" : false, +      "defaultYExtents" : false, +      "radiusRatio" : 9, +      "grid" : { +         "categoryLines" : false, +         "style" : { +            "color" : "#eee" +         } +      }, +      "times" : [], +      "interpolate" : "linear", +      "showCircles" : true, +      "scale" : "linear", +      "addTimeMarker" : false, +      "addLegend" : true, +      "addTooltip" : true, +      "drawLinesBetweenPoints" : true, +      "categoryAxes" : [ +         { +            "id" : "CategoryAxis-1", +            "style" : {}, +            "labels" : { +               "show" : true, +               "truncate" : 100 +            }, +            "show" : false, +            "scale" : { +               "type" : "linear" +            }, +            "position" : "bottom", +            "type" : "category", +            "title" : { +               "text" : "Commit info: id and date" +            } +         } +      ] +   }, +   "type" : "line", +   "listeners" : {}  } diff --git a/elastic/templates/visualization-visState-time.mustache b/elastic/templates/visualization-visState-time.mustache index b97b3b5..5141ce0 100644 --- a/elastic/templates/visualization-visState-time.mustache +++ b/elastic/templates/visualization-visState-time.mustache @@ -1,84 +1,189 @@  {     "type" : "line", -   "listeners" : {}, -   "title" : "Test time for {{{test_name}}}", -   "params" : { -      "legendPosition" : "right", -      "defaultYExtents" : false, -      "setYExtents" : false, -      "drawLinesBetweenPoints" : true, -      "interpolate" : "linear", -      "addTimeMarker" : false, -      "radiusRatio" : 9, -      "showCircles" : true, -      "scale" : "linear", -      "addTooltip" : true, -      "addLegend" : true, -      "times" : [] -   },     "aggs" : [        {           "type" : "avg",           "schema" : "metric",           "params" : {              "field" : "stats.median", -            "customLabel": "Median" +            "customLabel" : "Median (s)"           }, -         "enabled" : true, -         "id" : "1" +         "id" : "1", +         "enabled" : true        },        { -         "enabled" : true, -         "id" : "2", +         "type" : "terms", +         "schema" : "segment",           "params" : { -            "order" : "asc", -            "orderBy" : "custom", -            "field" : "commit_id_and_date", -            "customLabel" : "Commit info: id and date",              "size" : 1000,              "orderAgg" : { +               "enabled" : true, +               "type" : "min",                 "params" : {                    "field" : "commit_info.time"                 },                 "schema" : "orderAgg", -               "type" : "min", -               "enabled" : true,                 "id" : "2-orderAgg"              }, -            "ranges": [{"from": "*2017-4-1"}] +            "field" : "commit_id_and_date", +            "orderBy" : "custom", +            "customLabel" : "Commit info: id and date", +            "order" : "asc"           }, -         "schema" : "segment", -         "type" : "terms" +         "id" : "2", +         "enabled" : true        },        { -         "enabled" : true, -         "id" : "3",           "schema" : "metric",           "params" : {              "field" : "stats.mean", -            "customLabel": "Mean" +            "customLabel" : "Mean (s)"           }, -         "type" : "avg" +         "id" : "3", +         "type" : "avg", +         "enabled" : true        },        {           "id" : "4", -         "enabled" : true, -         "type" : "avg", -         "schema" : "metric",           "params" : {              "field" : "stats.iqr", -            "customLabel": "IQR" -         } +            "customLabel" : "IQR (s)" +         }, +         "schema" : "metric", +         "type" : "avg", +         "enabled" : true        },        { -         "type" : "avg", -         "schema" : "metric",           "params" : {              "field" : "stats.stddev", -            "customLabel": "Standard deviation" +            "customLabel" : "Standard deviation (s)"           }, +         "schema" : "metric",           "id" : "5", +         "type" : "avg",           "enabled" : true        } -   ] +   ], +   "params" : { +      "legendPosition" : "right", +      "drawLinesBetweenPoints" : true, +      "times" : [], +      "addTimeMarker" : false, +      "showCircles" : true, +      "scale" : "linear", +      "addLegend" : true, +      "defaultYExtents" : false, +      "radiusRatio" : 9, +      "interpolate" : "linear", +      "seriesParams" : [ +         { +            "interpolate" : "linear", +            "show" : true, +            "drawLinesBetweenPoints" : true, +            "valueAxis" : "ValueAxis-1", +            "mode" : "normal", +            "type" : "line", +            "lineWidth" : 2, +            "showCircles" : true, +            "data" : { +               "id" : "1", +               "label" : "Median (s)" +            } +         }, +         { +            "drawLinesBetweenPoints" : true, +            "interpolate" : "linear", +            "show" : true, +            "data" : { +               "label" : "Mean (s)", +               "id" : "3" +            }, +            "showCircles" : true, +            "valueAxis" : "ValueAxis-1", +            "mode" : "normal", +            "type" : "line", +            "lineWidth" : 2 +         }, +         { +            "show" : true, +            "interpolate" : "linear", +            "drawLinesBetweenPoints" : true, +            "type" : "line", +            "lineWidth" : 2, +            "valueAxis" : "ValueAxis-1", +            "mode" : "normal", +            "data" : { +               "id" : "4", +               "label" : "IQR (s)" +            }, +            "showCircles" : true +         }, +         { +            "type" : "line", +            "lineWidth" : 2, +            "valueAxis" : "ValueAxis-1", +            "mode" : "normal", +            "showCircles" : true, +            "data" : { +               "id" : "5", +               "label" : "Standard deviation (s)" +            }, +            "show" : true, +            "interpolate" : "linear", +            "drawLinesBetweenPoints" : true +         } +      ], +      "setYExtents" : false, +      "grid" : { +         "style" : { +            "color" : "#eee" +         }, +         "categoryLines" : false +      }, +      "addTooltip" : true, +      "categoryAxes" : [ +         { +            "scale" : { +               "type" : "linear" +            }, +            "title" : { +               "text" : "Commit info: id and date" +            }, +            "style" : {}, +            "type" : "category", +            "id" : "CategoryAxis-1", +            "position" : "bottom", +            "labels" : { +               "truncate" : 100, +               "show" : true +            }, +            "show" : false +         } +      ], +      "valueAxes" : [ +         { +            "title" : { +               "text" : "" +            }, +            "scale" : { +               "mode" : "normal", +               "type" : "linear" +            }, +            "style" : {}, +            "type" : "value", +            "id" : "ValueAxis-1", +            "position" : "left", +            "labels" : { +               "filter" : false, +               "rotate" : 0, +               "truncate" : 100, +               "show" : true +            }, +            "show" : true, +            "name" : "LeftAxis-1" +         } +      ] +   }, +   "title" : "Time taken by {{{test_name}}}", +   "listeners" : {}  } | 
