Updated IDE perf tests vega visualization to handle wide time ranges with aggregation
This commit is contained in:
@@ -95,25 +95,7 @@
|
||||
"name": "table",
|
||||
"comment": "To test chart in VEGA editor https://vega.github.io/editor/#/ change `_values` to `values` and rename `url` property",
|
||||
"_values": {
|
||||
"hits" : {
|
||||
"hits" : [
|
||||
{
|
||||
"_source" : {"buildId" : 87834896, "buildTimestamp" : "2020-09-21T21:00:31+0000", "metricValue" : 37, "benchmark" : "addImport"}
|
||||
},
|
||||
{
|
||||
"_source" : {"buildId" : 87783396, "buildTimestamp" : "2020-09-21T12:34:19+0000", "metricValue" : 37, "benchmark" : "addImport"}
|
||||
},
|
||||
{
|
||||
"_source" : {"buildId" : 87809918, "buildTimestamp" : "2020-09-21T16:47:11+0000", "metricValue" : 37, "benchmark" : "addImport"}
|
||||
},
|
||||
{
|
||||
"_source" : {"buildId" : 87905203, "buildTimestamp" : "2020-09-22T13:23:44+0000", "metricValue" : 37, "benchmark" : "addImport"}
|
||||
},
|
||||
{
|
||||
"_source" : {"buildId" : 87894638, "buildTimestamp" : "2020-09-22T09:12:16+0000", "metricValue" : 37, "benchmark" : "addImport"}
|
||||
}
|
||||
]
|
||||
}
|
||||
"comment": "same as `TestData highlight - vega.js`"
|
||||
},
|
||||
"url": {
|
||||
//"comment": "source index pattern",
|
||||
@@ -121,7 +103,7 @@
|
||||
//"comment": "it's a body of ES _search query to check query place it into `POST /kotlin_ide_benchmarks*/_search`",
|
||||
//"comment": "it uses Kibana specific %timefilter% for time frame selection",
|
||||
"body": {
|
||||
"size": 1000,
|
||||
"size": 0,
|
||||
"query": {
|
||||
"bool": {
|
||||
"must": [
|
||||
@@ -139,56 +121,78 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"_source": ["buildId", "benchmark", "buildTimestamp", "hasError", "metricValue"],
|
||||
"sort": [{"buildTimestamp": {"order": "asc"}}]
|
||||
"aggs": {
|
||||
"benchmark": {
|
||||
"terms": {
|
||||
"field": "benchmark.keyword",
|
||||
"size": 500
|
||||
},
|
||||
"aggs": {
|
||||
"name": {
|
||||
"terms": {
|
||||
"field": "name.keyword",
|
||||
"size": 500
|
||||
},
|
||||
"aggs": {
|
||||
"values": {
|
||||
"auto_date_histogram": {
|
||||
"buckets": 500,
|
||||
"field": "buildTimestamp",
|
||||
"minimum_interval": "hour"
|
||||
},
|
||||
"aggs": {
|
||||
"buildId": {
|
||||
"terms": {
|
||||
"size": 1,
|
||||
"field": "buildId"
|
||||
}
|
||||
},
|
||||
"avgValue":{
|
||||
"avg": {
|
||||
"field": "metricValue"
|
||||
}
|
||||
},
|
||||
"avgError":{
|
||||
"avg": {
|
||||
"field": "metricError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"format": {"property": "hits.hits"},
|
||||
"format": {"property": "aggregations"},
|
||||
"comment": "we need to have follow data: \"buildId\", \"metricName\", \"metricValue\" and \"metricError\"",
|
||||
"comment": "so it has to be array of {\"buildId\": \"...\", \"metricName\": \"...\", \"metricValue\": ..., \"metricError\": ...}",
|
||||
"transform": [
|
||||
{"type": "collect","sort": {"field": "_source.buildTimestamp"}},
|
||||
{
|
||||
"comment": "make alias: _source.buildId -> buildId",
|
||||
"type": "formula",
|
||||
"as": "buildId",
|
||||
"expr": "datum._source.buildId"
|
||||
},
|
||||
{
|
||||
"comment": "make alias: _source.benchmark -> metricName",
|
||||
"type": "formula",
|
||||
"as": "metricName",
|
||||
"expr": "datum._source.benchmark"
|
||||
},
|
||||
{
|
||||
"comment": "make alias: _source.metricValue -> metricValue",
|
||||
"type": "formula",
|
||||
"as": "metricValue",
|
||||
"expr": "datum._source.metricValue"
|
||||
},
|
||||
{
|
||||
"comment": "define metricError",
|
||||
"type": "formula",
|
||||
"as": "metricError",
|
||||
"expr": "1"
|
||||
},
|
||||
{
|
||||
"comment": "make alias: _source.hasError -> hasError",
|
||||
"type": "formula",
|
||||
"as": "hasError",
|
||||
"expr": "datum._source.metrics ? datum._source.hasError : false"
|
||||
},
|
||||
{"type": "project", "fields": ["benchmark"]},
|
||||
{"type": "flatten", "fields": ["benchmark.buckets"], "as": ["benchmark_buckets"]},
|
||||
{"type": "project", "fields": ["benchmark_buckets.key", "benchmark_buckets.name"], "as": ["benchmark", "benchmark_buckets_name"]},
|
||||
{"type": "flatten", "fields": ["benchmark_buckets_name.buckets"], "as": ["name_buckets"]},
|
||||
{"type": "project", "fields": ["benchmark", "name_buckets.key", "name_buckets.values"], "as": ["benchmark", "name", "name_values"]},
|
||||
{"type": "flatten", "fields": ["name_values.buckets"], "as": ["name_values_buckets"]},
|
||||
{"type": "project", "fields": ["benchmark", "name", "name_values_buckets.key", "name_values_buckets.key_as_string", "name_values_buckets.avgError", "name_values_buckets.avgValue", "name_values_buckets.buildId.buckets"], "as": ["metricName", "name", "buildTimestamp", "timestamp_value", "avgError", "avgValue", "buildId_buckets"]},
|
||||
{"type": "formula", "as": "metricError", "expr": "datum.avgError.value"},
|
||||
{"type": "formula", "as": "metricValue", "expr": "datum.avgValue.value"},
|
||||
{"type": "flatten", "fields": ["buildId_buckets"], "as": ["buildId_values"]},
|
||||
{"type": "formula", "as": "buildId", "expr": "datum.buildId_values.key"},
|
||||
{
|
||||
"type": "formula",
|
||||
"as": "timestamp",
|
||||
"expr": "timeFormat(toDate(datum._source.buildTimestamp), '%Y-%m-%d %H:%M')"
|
||||
"expr": "timeFormat(toDate(datum.buildTimestamp), '%Y-%m-%d %H:%M')"
|
||||
},
|
||||
{
|
||||
"comment": "create `url` value that points to TC build",
|
||||
"type": "formula",
|
||||
"as": "url",
|
||||
"expr": "'https://buildserver.labs.intellij.net/buildConfiguration/Kotlin_Benchmarks_PluginPerformanceTests_IdeaPluginPerformanceTests/' + datum._source.buildId"
|
||||
}
|
||||
"expr": "'https://buildserver.labs.intellij.net/buildConfiguration/Kotlin_Benchmarks_PluginPerformanceTests_IdeaPluginPerformanceTests/' + datum.buildId"
|
||||
},
|
||||
{"type": "collect","sort": {"field": "timestamp"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -95,80 +95,15 @@
|
||||
"name": "table",
|
||||
"comment": "To test chart in VEGA editor https://vega.github.io/editor/#/ change `_values` to `values` and rename `url` property",
|
||||
"_values": {
|
||||
"hits" : {
|
||||
"hits" : [
|
||||
{
|
||||
"_source" : {
|
||||
"buildTimestamp" : "2020-10-14T15:12:14+0000",
|
||||
"buildId" : 90615916,
|
||||
"metrics" : [
|
||||
{
|
||||
"hasError" : true
|
||||
}
|
||||
],
|
||||
"geomMean" : 157,
|
||||
"benchmark" : "completion-basic"
|
||||
}
|
||||
},
|
||||
{
|
||||
"_source" : {
|
||||
"buildTimestamp" : "2020-10-14T13:15:31+0000",
|
||||
"buildId" : 90615916,
|
||||
"geomMean" : 80,
|
||||
"benchmark" : "completion-basic-charFilter"
|
||||
}
|
||||
},
|
||||
{
|
||||
"_source" : {
|
||||
"buildTimestamp" : "2020-10-14T10:53:52+0000",
|
||||
"buildId" : 90597868,
|
||||
"geomMean" : 160,
|
||||
"benchmark" : "completion-basic"
|
||||
}
|
||||
},
|
||||
{
|
||||
"_source" : {
|
||||
"buildTimestamp" : "2020-10-14T08:57:05+0000",
|
||||
"buildId" : 90597868,
|
||||
"geomMean" : 79,
|
||||
"benchmark" : "completion-basic-charFilter"
|
||||
}
|
||||
},
|
||||
{
|
||||
"_source" : {
|
||||
"buildTimestamp" : "2020-10-14T03:04:10+0000",
|
||||
"buildId" : 90570192,
|
||||
"geomMean" : 79,
|
||||
"benchmark" : "completion-basic-charFilter"
|
||||
}
|
||||
},
|
||||
{
|
||||
"_source" : {
|
||||
"buildTimestamp" : "2020-10-14T03:04:09+0000",
|
||||
"buildId" : 90570192,
|
||||
"geomMean" : 60,
|
||||
"benchmark" : "completion-basic"
|
||||
}
|
||||
},
|
||||
{
|
||||
"_source" : {
|
||||
"buildTimestamp" : "2020-10-14T00:42:58+0000",
|
||||
"buildId" : 90546466,
|
||||
"geomMean" : 158,
|
||||
"benchmark" : "completion-basic"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
"comment": "same as `TestData highlight - vega.js`"
|
||||
},
|
||||
"url": {
|
||||
//"comment": "source index pattern",
|
||||
"index": "kotlin_ide_benchmarks*",
|
||||
//"comment": "it's a body of ES _search query to check query place it into `POST /kotlin_ide_benchmarks*/_search`",
|
||||
//"comment": "it uses Kibana specific %timefilter% for time frame selection",
|
||||
"body": {
|
||||
"size": 1000,
|
||||
"size": 0,
|
||||
"query": {
|
||||
"bool": {
|
||||
"must": [
|
||||
@@ -195,56 +130,78 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"_source": ["buildId", "benchmark", "buildTimestamp", "name", "metricValue", "hasError"],
|
||||
"sort": [{"buildTimestamp": {"order": "asc"}}]
|
||||
"aggs": {
|
||||
"benchmark": {
|
||||
"terms": {
|
||||
"field": "benchmark.keyword",
|
||||
"size": 500
|
||||
},
|
||||
"aggs": {
|
||||
"name": {
|
||||
"terms": {
|
||||
"field": "name.keyword",
|
||||
"size": 500
|
||||
},
|
||||
"aggs": {
|
||||
"values": {
|
||||
"auto_date_histogram": {
|
||||
"buckets": 500,
|
||||
"field": "buildTimestamp",
|
||||
"minimum_interval": "hour"
|
||||
},
|
||||
"aggs": {
|
||||
"buildId": {
|
||||
"terms": {
|
||||
"size": 1,
|
||||
"field": "buildId"
|
||||
}
|
||||
},
|
||||
"avgValue":{
|
||||
"avg": {
|
||||
"field": "metricValue"
|
||||
}
|
||||
},
|
||||
"avgError":{
|
||||
"avg": {
|
||||
"field": "metricError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"format": {"property": "hits.hits"},
|
||||
"format": {"property": "aggregations"},
|
||||
"comment": "we need to have follow data: \"buildId\", \"metricName\", \"metricValue\" and \"metricError\"",
|
||||
"comment": "so it has to be array of {\"buildId\": \"...\", \"metricName\": \"...\", \"metricValue\": ..., \"metricError\": ...}",
|
||||
"transform": [
|
||||
{"type": "collect","sort": {"field": "_source.buildTimestamp"}},
|
||||
{
|
||||
"comment": "make alias: _source.buildId -> buildId",
|
||||
"type": "formula",
|
||||
"as": "buildId",
|
||||
"expr": "datum._source.buildId"
|
||||
},
|
||||
{
|
||||
"comment": "make alias: _source.benchmark -> metricName",
|
||||
"type": "formula",
|
||||
"as": "metricName",
|
||||
"expr": "datum._source.benchmark"
|
||||
},
|
||||
{
|
||||
"comment": "make alias: _source.metricValue -> metricValue",
|
||||
"type": "formula",
|
||||
"as": "metricValue",
|
||||
"expr": "datum._source.metricValue"
|
||||
},
|
||||
{
|
||||
"comment": "define metricError",
|
||||
"type": "formula",
|
||||
"as": "metricError",
|
||||
"expr": "1"
|
||||
},
|
||||
{
|
||||
"comment": "make alias: _source.hasError -> hasError",
|
||||
"type": "formula",
|
||||
"as": "hasError",
|
||||
"expr": "datum._source.hasError ? datum._source.hasError : false"
|
||||
},
|
||||
{"type": "project", "fields": ["benchmark"]},
|
||||
{"type": "flatten", "fields": ["benchmark.buckets"], "as": ["benchmark_buckets"]},
|
||||
{"type": "project", "fields": ["benchmark_buckets.key", "benchmark_buckets.name"], "as": ["benchmark", "benchmark_buckets_name"]},
|
||||
{"type": "flatten", "fields": ["benchmark_buckets_name.buckets"], "as": ["name_buckets"]},
|
||||
{"type": "project", "fields": ["benchmark", "name_buckets.key", "name_buckets.values"], "as": ["benchmark", "name", "name_values"]},
|
||||
{"type": "flatten", "fields": ["name_values.buckets"], "as": ["name_values_buckets"]},
|
||||
{"type": "project", "fields": ["benchmark", "name", "name_values_buckets.key", "name_values_buckets.key_as_string", "name_values_buckets.avgError", "name_values_buckets.avgValue", "name_values_buckets.buildId.buckets"], "as": ["metricName", "name", "buildTimestamp", "timestamp_value", "avgError", "avgValue", "buildId_buckets"]},
|
||||
{"type": "formula", "as": "metricError", "expr": "datum.avgError.value"},
|
||||
{"type": "formula", "as": "metricValue", "expr": "datum.avgValue.value"},
|
||||
{"type": "flatten", "fields": ["buildId_buckets"], "as": ["buildId_values"]},
|
||||
{"type": "formula", "as": "buildId", "expr": "datum.buildId_values.key"},
|
||||
{
|
||||
"type": "formula",
|
||||
"as": "timestamp",
|
||||
"expr": "timeFormat(toDate(datum._source.buildTimestamp), '%Y-%m-%d %H:%M')"
|
||||
"expr": "timeFormat(toDate(datum.buildTimestamp), '%Y-%m-%d %H:%M')"
|
||||
},
|
||||
{
|
||||
"comment": "create `url` value that points to TC build",
|
||||
"type": "formula",
|
||||
"as": "url",
|
||||
"expr": "'https://buildserver.labs.intellij.net/buildConfiguration/Kotlin_Benchmarks_PluginPerformanceTests_IdeaPluginPerformanceTests/' + datum._source.buildId"
|
||||
}
|
||||
"expr": "'https://buildserver.labs.intellij.net/buildConfiguration/Kotlin_Benchmarks_PluginPerformanceTests_IdeaPluginPerformanceTests/' + datum.buildId"
|
||||
},
|
||||
{"type": "collect","sort": {"field": "timestamp"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -95,64 +95,95 @@
|
||||
"name": "table",
|
||||
"comment": "To test chart in VEGA editor https://vega.github.io/editor/#/ change `_values` to `values` and rename `url` property",
|
||||
"_values": {
|
||||
"hits" : {
|
||||
"hits" : [
|
||||
{
|
||||
"_source" : {
|
||||
"buildId" : 87834896,
|
||||
"buildTimestamp" : "2020-09-21T21:00:31+0000",
|
||||
"metrics" : [
|
||||
{"metricName" : "NonNullAssertion", "metricValue" : 31, "metricError" : 1 },
|
||||
{"metricName" : "PropertiesWithPropertyDeclarations", "metricValue" : 191, "metricError" : 4 }
|
||||
],
|
||||
"benchmark" : "highlight"
|
||||
"aggregations" : {
|
||||
"benchmark" : {
|
||||
"doc_count_error_upper_bound" : 0,
|
||||
"sum_other_doc_count" : 0,
|
||||
"buckets" : [
|
||||
{
|
||||
"key" : "highlight",
|
||||
"doc_count" : 1034,
|
||||
"name" : {
|
||||
"doc_count_error_upper_bound" : 0,
|
||||
"sum_other_doc_count" : 0,
|
||||
"buckets" : [
|
||||
{
|
||||
"key" : "Annotations",
|
||||
"doc_count" : 23,
|
||||
"values" : {
|
||||
"buckets" : [
|
||||
{
|
||||
"key_as_string" : "2020-11-02T09:00:00.000Z",
|
||||
"key" : 1604307600000,
|
||||
"doc_count" : 3,
|
||||
"avgError" : {
|
||||
"value" : 1.0
|
||||
},
|
||||
"avgValue" : {
|
||||
"value" : 129.0
|
||||
},
|
||||
"buildId" : {
|
||||
"doc_count_error_upper_bound" : 0,
|
||||
"sum_other_doc_count" : 1,
|
||||
"buckets" : [
|
||||
{
|
||||
"key" : 93277596,
|
||||
"doc_count" : 2
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"key_as_string" : "2020-11-02T21:00:00.000Z",
|
||||
"key" : 1604350800000,
|
||||
"doc_count" : 3,
|
||||
"avgError" : {
|
||||
"value" : 1.0
|
||||
},
|
||||
"avgValue" : {
|
||||
"value" : 41.0
|
||||
},
|
||||
"buildId" : {
|
||||
"doc_count_error_upper_bound" : 0,
|
||||
"sum_other_doc_count" : 2,
|
||||
"buckets" : [
|
||||
{
|
||||
"key" : 93400366,
|
||||
"doc_count" : 1
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"key_as_string" : "2020-11-03T09:00:00.000Z",
|
||||
"key" : 1604394000000,
|
||||
"doc_count" : 2,
|
||||
"avgError" : {
|
||||
"value" : 1.5
|
||||
},
|
||||
"avgValue" : {
|
||||
"value" : 42.0
|
||||
},
|
||||
"buildId" : {
|
||||
"doc_count_error_upper_bound" : 0,
|
||||
"sum_other_doc_count" : 1,
|
||||
"buckets" : [
|
||||
{
|
||||
"key" : 93507855,
|
||||
"doc_count" : 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"interval" : "12h"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"_source" : {
|
||||
"buildId" : 87783396,
|
||||
"buildTimestamp" : "2020-09-21T12:34:19+0000",
|
||||
"metrics" : [
|
||||
{"metricName" : "NonNullAssertion", "metricValue" : 32, "metricError" : 1 },
|
||||
{"metricName" : "PropertiesWithPropertyDeclarations", "metricValue" : 189, "metricError" : 4 }
|
||||
],
|
||||
"benchmark" : "highlight"
|
||||
}
|
||||
},
|
||||
{
|
||||
"_source" : {
|
||||
"buildId" : 87809918,
|
||||
"buildTimestamp" : "2020-09-21T16:47:11+0000",
|
||||
"metrics" : [
|
||||
{"metricName" : "NonNullAssertion", "metricValue" : 30, "metricError" : 1 },
|
||||
{"metricName" : "PropertiesWithPropertyDeclarations", "metricValue" : 188, "metricError" : 4 }
|
||||
],
|
||||
"benchmark" : "highlight"
|
||||
}
|
||||
},
|
||||
{
|
||||
"_source" : {
|
||||
"buildId" : 87905203,
|
||||
"buildTimestamp" : "2020-09-22T13:23:44+0000",
|
||||
"metrics" : [
|
||||
{"metricName" : "NonNullAssertion", "metricValue" : 30, "metricError" : 1 },
|
||||
{"metricName" : "PropertiesWithPropertyDeclarations", "metricValue" : 180, "metricError" : 4 }
|
||||
],
|
||||
"benchmark" : "highlight"
|
||||
}
|
||||
},
|
||||
{
|
||||
"_source" : {
|
||||
"buildId" : 87894638,
|
||||
"buildTimestamp" : "2020-09-22T09:12:16+0000",
|
||||
"metrics" : [
|
||||
{"metricName" : "NonNullAssertion", "metricValue" : 32, "metricError" : 1 },
|
||||
{"metricName" : "PropertiesWithPropertyDeclarations", "metricValue" : 193, "metricError" : 4 }
|
||||
],
|
||||
"benchmark" : "highlight"
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"url": {
|
||||
@@ -161,8 +192,7 @@
|
||||
//"comment": "it's a body of ES _search query to check query place it into `POST /kotlin_ide_benchmarks*/_search`",
|
||||
//"comment": "it uses Kibana specific %timefilter% for time frame selection",
|
||||
"body": {
|
||||
"size": 1000,
|
||||
|
||||
"size": 0,
|
||||
"query": {
|
||||
"bool": {
|
||||
"must": [
|
||||
@@ -179,62 +209,78 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"_source": ["buildId", "benchmark", "name", "buildTimestamp", "hasError", "metricValue", "metricError"],
|
||||
"sort": [{"buildTimestamp": {"order": "asc"}}]
|
||||
"aggs": {
|
||||
"benchmark": {
|
||||
"terms": {
|
||||
"field": "benchmark.keyword",
|
||||
"size": 500
|
||||
},
|
||||
"aggs": {
|
||||
"name": {
|
||||
"terms": {
|
||||
"field": "name.keyword",
|
||||
"size": 500
|
||||
},
|
||||
"aggs": {
|
||||
"values": {
|
||||
"auto_date_histogram": {
|
||||
"buckets": 500,
|
||||
"field": "buildTimestamp",
|
||||
"minimum_interval": "hour"
|
||||
},
|
||||
"aggs": {
|
||||
"buildId": {
|
||||
"terms": {
|
||||
"size": 1,
|
||||
"field": "buildId"
|
||||
}
|
||||
},
|
||||
"avgValue":{
|
||||
"avg": {
|
||||
"field": "metricValue"
|
||||
}
|
||||
},
|
||||
"avgError":{
|
||||
"avg": {
|
||||
"field": "metricError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"format": {"property": "hits.hits"},
|
||||
"format": {"property": "aggregations"},
|
||||
"comment": "we need to have follow data: \"buildId\", \"metricName\", \"metricValue\" and \"metricError\"",
|
||||
"comment": "so it has to be array of {\"buildId\": \"...\", \"metricName\": \"...\", \"metricValue\": ..., \"metricError\": ...}",
|
||||
"transform": [
|
||||
{"type": "collect","sort": {"field": "_source.buildTimestamp"}},
|
||||
{
|
||||
"comment": "make alias: _source.buildId -> buildId",
|
||||
"type": "formula",
|
||||
"as": "buildId",
|
||||
"expr": "datum._source.buildId"
|
||||
},
|
||||
{
|
||||
"comment": "make alias: _source.benchmark -> metricName",
|
||||
"type": "formula",
|
||||
"as": "metricName",
|
||||
"expr": "datum._source.benchmark"
|
||||
},
|
||||
{
|
||||
"comment": "make alias: _source.metricValue -> metricValue",
|
||||
"type": "formula",
|
||||
"as": "metricValue",
|
||||
"expr": "datum._source.metricValue"
|
||||
},
|
||||
{
|
||||
"comment": "make alias: _source.name -> metricName",
|
||||
"type": "formula",
|
||||
"as": "metricName",
|
||||
"expr": "datum._source.name"
|
||||
},
|
||||
{
|
||||
"comment": "define metricError",
|
||||
"type": "formula",
|
||||
"as": "metricError",
|
||||
"expr": "1"
|
||||
},
|
||||
{
|
||||
"comment": "make alias: _source.hasError -> hasError",
|
||||
"type": "formula",
|
||||
"as": "hasError",
|
||||
"expr": "datum._source.metrics ? datum._source.hasError : false"
|
||||
},
|
||||
{"type": "project", "fields": ["benchmark"]},
|
||||
{"type": "flatten", "fields": ["benchmark.buckets"], "as": ["benchmark_buckets"]},
|
||||
{"type": "project", "fields": ["benchmark_buckets.key", "benchmark_buckets.name"], "as": ["benchmark", "benchmark_buckets_name"]},
|
||||
{"type": "flatten", "fields": ["benchmark_buckets_name.buckets"], "as": ["name_buckets"]},
|
||||
{"type": "project", "fields": ["benchmark", "name_buckets.key", "name_buckets.values"], "as": ["benchmark", "name", "name_values"]},
|
||||
{"type": "flatten", "fields": ["name_values.buckets"], "as": ["name_values_buckets"]},
|
||||
{"type": "project", "fields": ["benchmark", "name", "name_values_buckets.key", "name_values_buckets.key_as_string", "name_values_buckets.avgError", "name_values_buckets.avgValue", "name_values_buckets.buildId.buckets"], "as": ["benchmark", "metricName", "buildTimestamp", "timestamp_value", "avgError", "avgValue", "buildId_buckets"]},
|
||||
{"type": "formula", "as": "metricError", "expr": "datum.avgError.value"},
|
||||
{"type": "formula", "as": "metricValue", "expr": "datum.avgValue.value"},
|
||||
{"type": "flatten", "fields": ["buildId_buckets"], "as": ["buildId_values"]},
|
||||
{"type": "formula", "as": "buildId", "expr": "datum.buildId_values.key"},
|
||||
{
|
||||
"type": "formula",
|
||||
"as": "timestamp",
|
||||
"expr": "timeFormat(toDate(datum._source.buildTimestamp), '%Y-%m-%d %H:%M')"
|
||||
"expr": "timeFormat(toDate(datum.buildTimestamp), '%Y-%m-%d %H:%M')"
|
||||
},
|
||||
{
|
||||
"comment": "create `url` value that points to TC build",
|
||||
"type": "formula",
|
||||
"as": "url",
|
||||
"expr": "'https://buildserver.labs.intellij.net/buildConfiguration/Kotlin_Benchmarks_PluginPerformanceTests_IdeaPluginPerformanceTests/' + datum.buildId"
|
||||
}
|
||||
},
|
||||
{"type": "collect","sort": {"field": "timestamp"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -95,25 +95,7 @@
|
||||
"name": "table",
|
||||
"comment": "To test chart in VEGA editor https://vega.github.io/editor/#/ change `_values` to `values` and rename `url` property",
|
||||
"_values": {
|
||||
"hits" : {
|
||||
"hits" : [
|
||||
{
|
||||
"_source" : {"buildId" : 87834896, "buildTimestamp" : "2020-09-21T21:00:31+0000", "geomMean" : 37, "benchmark" : "highlight"}
|
||||
},
|
||||
{
|
||||
"_source" : {"buildId" : 87783396, "buildTimestamp" : "2020-09-21T12:34:19+0000", "geomMean" : 37, "benchmark" : "highlight"}
|
||||
},
|
||||
{
|
||||
"_source" : {"buildId" : 87809918, "buildTimestamp" : "2020-09-21T16:47:11+0000", "geomMean" : 37, "benchmark" : "highlight"}
|
||||
},
|
||||
{
|
||||
"_source" : {"buildId" : 87905203, "buildTimestamp" : "2020-09-22T13:23:44+0000", "geomMean" : 37, "benchmark" : "highlight"}
|
||||
},
|
||||
{
|
||||
"_source" : {"buildId" : 87894638, "buildTimestamp" : "2020-09-22T09:12:16+0000", "geomMean" : 37, "benchmark" : "highlight"}
|
||||
}
|
||||
]
|
||||
}
|
||||
"comment": "same as `TestData highlight - vega.js`"
|
||||
},
|
||||
"url": {
|
||||
//"comment": "source index pattern",
|
||||
@@ -121,7 +103,7 @@
|
||||
//"comment": "it's a body of ES _search query to check query place it into `POST /kotlin_ide_benchmarks*/_search`",
|
||||
//"comment": "it uses Kibana specific %timefilter% for time frame selection",
|
||||
"body": {
|
||||
"size": 1000,
|
||||
"size": 0,
|
||||
"query": {
|
||||
"bool": {
|
||||
"must": [
|
||||
@@ -139,56 +121,78 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"_source": ["buildId", "benchmark", "buildTimestamp", "hasError", "metricValue"],
|
||||
"sort": [{"buildTimestamp": {"order": "asc"}}]
|
||||
"aggs": {
|
||||
"benchmark": {
|
||||
"terms": {
|
||||
"field": "benchmark.keyword",
|
||||
"size": 500
|
||||
},
|
||||
"aggs": {
|
||||
"name": {
|
||||
"terms": {
|
||||
"field": "name.keyword",
|
||||
"size": 500
|
||||
},
|
||||
"aggs": {
|
||||
"values": {
|
||||
"auto_date_histogram": {
|
||||
"buckets": 500,
|
||||
"field": "buildTimestamp",
|
||||
"minimum_interval": "hour"
|
||||
},
|
||||
"aggs": {
|
||||
"buildId": {
|
||||
"terms": {
|
||||
"size": 1,
|
||||
"field": "buildId"
|
||||
}
|
||||
},
|
||||
"avgValue":{
|
||||
"avg": {
|
||||
"field": "metricValue"
|
||||
}
|
||||
},
|
||||
"avgError":{
|
||||
"avg": {
|
||||
"field": "metricError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"format": {"property": "hits.hits"},
|
||||
"format": {"property": "aggregations"},
|
||||
"comment": "we need to have follow data: \"buildId\", \"metricName\", \"metricValue\" and \"metricError\"",
|
||||
"comment": "so it has to be array of {\"buildId\": \"...\", \"metricName\": \"...\", \"metricValue\": ..., \"metricError\": ...}",
|
||||
"transform": [
|
||||
{"type": "collect","sort": {"field": "_source.buildTimestamp"}},
|
||||
{
|
||||
"comment": "make alias: _source.buildId -> buildId",
|
||||
"type": "formula",
|
||||
"as": "buildId",
|
||||
"expr": "datum._source.buildId"
|
||||
},
|
||||
{
|
||||
"comment": "make alias: _source.benchmark -> metricName",
|
||||
"type": "formula",
|
||||
"as": "metricName",
|
||||
"expr": "datum._source.benchmark"
|
||||
},
|
||||
{
|
||||
"comment": "make alias: _source.metricValue -> metricValue",
|
||||
"type": "formula",
|
||||
"as": "metricValue",
|
||||
"expr": "datum._source.metricValue"
|
||||
},
|
||||
{
|
||||
"comment": "define metricError",
|
||||
"type": "formula",
|
||||
"as": "metricError",
|
||||
"expr": "1"
|
||||
},
|
||||
{
|
||||
"comment": "make alias: _source.hasError -> hasError",
|
||||
"type": "formula",
|
||||
"as": "hasError",
|
||||
"expr": "datum._source.metrics ? datum._source.hasError : false"
|
||||
},
|
||||
{"type": "project", "fields": ["benchmark"]},
|
||||
{"type": "flatten", "fields": ["benchmark.buckets"], "as": ["benchmark_buckets"]},
|
||||
{"type": "project", "fields": ["benchmark_buckets.key", "benchmark_buckets.name"], "as": ["benchmark", "benchmark_buckets_name"]},
|
||||
{"type": "flatten", "fields": ["benchmark_buckets_name.buckets"], "as": ["name_buckets"]},
|
||||
{"type": "project", "fields": ["benchmark", "name_buckets.key", "name_buckets.values"], "as": ["benchmark", "name", "name_values"]},
|
||||
{"type": "flatten", "fields": ["name_values.buckets"], "as": ["name_values_buckets"]},
|
||||
{"type": "project", "fields": ["benchmark", "name", "name_values_buckets.key", "name_values_buckets.key_as_string", "name_values_buckets.avgError", "name_values_buckets.avgValue", "name_values_buckets.buildId.buckets"], "as": ["metricName", "name", "buildTimestamp", "timestamp_value", "avgError", "avgValue", "buildId_buckets"]},
|
||||
{"type": "formula", "as": "metricError", "expr": "datum.avgError.value"},
|
||||
{"type": "formula", "as": "metricValue", "expr": "datum.avgValue.value"},
|
||||
{"type": "flatten", "fields": ["buildId_buckets"], "as": ["buildId_values"]},
|
||||
{"type": "formula", "as": "buildId", "expr": "datum.buildId_values.key"},
|
||||
{
|
||||
"type": "formula",
|
||||
"as": "timestamp",
|
||||
"expr": "timeFormat(toDate(datum._source.buildTimestamp), '%Y-%m-%d %H:%M')"
|
||||
"expr": "timeFormat(toDate(datum.buildTimestamp), '%Y-%m-%d %H:%M')"
|
||||
},
|
||||
{
|
||||
"comment": "create `url` value that points to TC build",
|
||||
"type": "formula",
|
||||
"as": "url",
|
||||
"expr": "'https://buildserver.labs.intellij.net/buildConfiguration/Kotlin_Benchmarks_PluginPerformanceTests_IdeaPluginPerformanceTests/' + datum._source.buildId"
|
||||
}
|
||||
"expr": "'https://buildserver.labs.intellij.net/buildConfiguration/Kotlin_Benchmarks_PluginPerformanceTests_IdeaPluginPerformanceTests/' + datum.buildId"
|
||||
},
|
||||
{"type": "collect","sort": {"field": "timestamp"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
+60
-103
@@ -95,65 +95,7 @@
|
||||
"name": "table",
|
||||
"comment": "To test chart in VEGA editor https://vega.github.io/editor/#/ change `_values` to `values` and rename `url` property",
|
||||
"_values": {
|
||||
"hits" : {
|
||||
"hits" : [
|
||||
{
|
||||
"_source" : {
|
||||
"buildId" : 87834896,
|
||||
"buildTimestamp" : "2020-09-21T21:00:31+0000",
|
||||
"metrics" : [
|
||||
{"metricName" : "NonNullAssertion", "metricValue" : 31, "metricError" : 1 },
|
||||
{"metricName" : "PropertiesWithPropertyDeclarations", "metricValue" : 191, "metricError" : 4 }
|
||||
],
|
||||
"benchmark" : "highlight"
|
||||
}
|
||||
},
|
||||
{
|
||||
"_source" : {
|
||||
"buildId" : 87783396,
|
||||
"buildTimestamp" : "2020-09-21T12:34:19+0000",
|
||||
"metrics" : [
|
||||
{"metricName" : "NonNullAssertion", "metricValue" : 32, "metricError" : 1 },
|
||||
{"metricName" : "PropertiesWithPropertyDeclarations", "metricValue" : 189, "metricError" : 4 }
|
||||
],
|
||||
"benchmark" : "highlight"
|
||||
}
|
||||
},
|
||||
{
|
||||
"_source" : {
|
||||
"buildId" : 87809918,
|
||||
"buildTimestamp" : "2020-09-21T16:47:11+0000",
|
||||
"metrics" : [
|
||||
{"metricName" : "NonNullAssertion", "metricValue" : 30, "metricError" : 1 },
|
||||
{"metricName" : "PropertiesWithPropertyDeclarations", "metricValue" : 188, "metricError" : 4 }
|
||||
],
|
||||
"benchmark" : "highlight"
|
||||
}
|
||||
},
|
||||
{
|
||||
"_source" : {
|
||||
"buildId" : 87905203,
|
||||
"buildTimestamp" : "2020-09-22T13:23:44+0000",
|
||||
"metrics" : [
|
||||
{"metricName" : "NonNullAssertion", "metricValue" : 30, "metricError" : 1 },
|
||||
{"metricName" : "PropertiesWithPropertyDeclarations", "metricValue" : 180, "metricError" : 4 }
|
||||
],
|
||||
"benchmark" : "highlight"
|
||||
}
|
||||
},
|
||||
{
|
||||
"_source" : {
|
||||
"buildId" : 87894638,
|
||||
"buildTimestamp" : "2020-09-22T09:12:16+0000",
|
||||
"metrics" : [
|
||||
{"metricName" : "NonNullAssertion", "metricValue" : 32, "metricError" : 1 },
|
||||
{"metricName" : "PropertiesWithPropertyDeclarations", "metricValue" : 193, "metricError" : 4 }
|
||||
],
|
||||
"benchmark" : "highlight"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
"comment": "same as `TestData highlight - vega.js`"
|
||||
},
|
||||
"url": {
|
||||
//"comment": "source index pattern",
|
||||
@@ -161,8 +103,7 @@
|
||||
//"comment": "it's a body of ES _search query to check query place it into `POST /kotlin_ide_benchmarks*/_search`",
|
||||
//"comment": "it uses Kibana specific %timefilter% for time frame selection",
|
||||
"body": {
|
||||
"size": 1000,
|
||||
|
||||
"size": 0,
|
||||
"query": {
|
||||
"bool": {
|
||||
"must": [
|
||||
@@ -179,62 +120,78 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"_source": ["buildId", "benchmark", "name", "buildTimestamp", "hasError", "metricValue", "metricError"],
|
||||
"sort": [{"buildTimestamp": {"order": "asc"}}]
|
||||
"aggs": {
|
||||
"benchmark": {
|
||||
"terms": {
|
||||
"field": "benchmark.keyword",
|
||||
"size": 500
|
||||
},
|
||||
"aggs": {
|
||||
"name": {
|
||||
"terms": {
|
||||
"field": "name.keyword",
|
||||
"size": 500
|
||||
},
|
||||
"aggs": {
|
||||
"values": {
|
||||
"auto_date_histogram": {
|
||||
"buckets": 500,
|
||||
"field": "buildTimestamp",
|
||||
"minimum_interval": "hour"
|
||||
},
|
||||
"aggs": {
|
||||
"buildId": {
|
||||
"terms": {
|
||||
"size": 1,
|
||||
"field": "buildId"
|
||||
}
|
||||
},
|
||||
"avgValue":{
|
||||
"avg": {
|
||||
"field": "metricValue"
|
||||
}
|
||||
},
|
||||
"avgError":{
|
||||
"avg": {
|
||||
"field": "metricError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"format": {"property": "hits.hits"},
|
||||
"format": {"property": "aggregations"},
|
||||
"comment": "we need to have follow data: \"buildId\", \"metricName\", \"metricValue\" and \"metricError\"",
|
||||
"comment": "so it has to be array of {\"buildId\": \"...\", \"metricName\": \"...\", \"metricValue\": ..., \"metricError\": ...}",
|
||||
"transform": [
|
||||
{"type": "collect","sort": {"field": "_source.buildTimestamp"}},
|
||||
{
|
||||
"comment": "make alias: _source.buildId -> buildId",
|
||||
"type": "formula",
|
||||
"as": "buildId",
|
||||
"expr": "datum._source.buildId"
|
||||
},
|
||||
{
|
||||
"comment": "make alias: _source.benchmark -> metricName",
|
||||
"type": "formula",
|
||||
"as": "metricName",
|
||||
"expr": "datum._source.benchmark"
|
||||
},
|
||||
{
|
||||
"comment": "make alias: _source.metricValue -> metricValue",
|
||||
"type": "formula",
|
||||
"as": "metricValue",
|
||||
"expr": "datum._source.metricValue"
|
||||
},
|
||||
{
|
||||
"comment": "make alias: _source.name -> metricName",
|
||||
"type": "formula",
|
||||
"as": "metricName",
|
||||
"expr": "datum._source.name"
|
||||
},
|
||||
{
|
||||
"comment": "define metricError",
|
||||
"type": "formula",
|
||||
"as": "metricError",
|
||||
"expr": "1"
|
||||
},
|
||||
{
|
||||
"comment": "make alias: _source.hasError -> hasError",
|
||||
"type": "formula",
|
||||
"as": "hasError",
|
||||
"expr": "datum._source.metrics ? datum._source.hasError : false"
|
||||
},
|
||||
{"type": "project", "fields": ["benchmark"]},
|
||||
{"type": "flatten", "fields": ["benchmark.buckets"], "as": ["benchmark_buckets"]},
|
||||
{"type": "project", "fields": ["benchmark_buckets.key", "benchmark_buckets.name"], "as": ["benchmark", "benchmark_buckets_name"]},
|
||||
{"type": "flatten", "fields": ["benchmark_buckets_name.buckets"], "as": ["name_buckets"]},
|
||||
{"type": "project", "fields": ["benchmark", "name_buckets.key", "name_buckets.values"], "as": ["benchmark", "name", "name_values"]},
|
||||
{"type": "flatten", "fields": ["name_values.buckets"], "as": ["name_values_buckets"]},
|
||||
{"type": "project", "fields": ["benchmark", "name", "name_values_buckets.key", "name_values_buckets.key_as_string", "name_values_buckets.avgError", "name_values_buckets.avgValue", "name_values_buckets.buildId.buckets"], "as": ["benchmark", "metricName", "buildTimestamp", "timestamp_value", "avgError", "avgValue", "buildId_buckets"]},
|
||||
{"type": "formula", "as": "metricError", "expr": "datum.avgError.value"},
|
||||
{"type": "formula", "as": "metricValue", "expr": "datum.avgValue.value"},
|
||||
{"type": "flatten", "fields": ["buildId_buckets"], "as": ["buildId_values"]},
|
||||
{"type": "formula", "as": "buildId", "expr": "datum.buildId_values.key"},
|
||||
{
|
||||
"type": "formula",
|
||||
"as": "timestamp",
|
||||
"expr": "timeFormat(toDate(datum._source.buildTimestamp), '%Y-%m-%d %H:%M')"
|
||||
"expr": "timeFormat(toDate(datum.buildTimestamp), '%Y-%m-%d %H:%M')"
|
||||
},
|
||||
{
|
||||
"comment": "create `url` value that points to TC build",
|
||||
"type": "formula",
|
||||
"as": "url",
|
||||
"expr": "'https://buildserver.labs.intellij.net/buildConfiguration/Kotlin_Benchmarks_PluginPerformanceTests_IdeaPluginPerformanceTests/' + datum.buildId"
|
||||
}
|
||||
},
|
||||
{"type": "collect","sort": {"field": "timestamp"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -95,25 +95,7 @@
|
||||
"name": "table",
|
||||
"comment": "To test chart in VEGA editor https://vega.github.io/editor/#/ change `_values` to `values` and rename `url` property",
|
||||
"_values": {
|
||||
"hits" : {
|
||||
"hits" : [
|
||||
{
|
||||
"_source" : {"buildId" : 87834896, "buildTimestamp" : "2020-09-21T21:00:31+0000", "metricValue" : 37, "benchmark" : "addImport"}
|
||||
},
|
||||
{
|
||||
"_source" : {"buildId" : 87783396, "buildTimestamp" : "2020-09-21T12:34:19+0000", "metricValue" : 37, "benchmark" : "addImport"}
|
||||
},
|
||||
{
|
||||
"_source" : {"buildId" : 87809918, "buildTimestamp" : "2020-09-21T16:47:11+0000", "metricValue" : 37, "benchmark" : "addImport"}
|
||||
},
|
||||
{
|
||||
"_source" : {"buildId" : 87905203, "buildTimestamp" : "2020-09-22T13:23:44+0000", "metricValue" : 37, "benchmark" : "addImport"}
|
||||
},
|
||||
{
|
||||
"_source" : {"buildId" : 87894638, "buildTimestamp" : "2020-09-22T09:12:16+0000", "metricValue" : 37, "benchmark" : "addImport"}
|
||||
}
|
||||
]
|
||||
}
|
||||
"comment": "same as `TestData highlight - vega.js`"
|
||||
},
|
||||
"url": {
|
||||
//"comment": "source index pattern",
|
||||
@@ -121,7 +103,7 @@
|
||||
//"comment": "it's a body of ES _search query to check query place it into `POST /kotlin_ide_benchmarks*/_search`",
|
||||
//"comment": "it uses Kibana specific %timefilter% for time frame selection",
|
||||
"body": {
|
||||
"size": 1000,
|
||||
"size": 0,
|
||||
"query": {
|
||||
"bool": {
|
||||
"must": [
|
||||
@@ -146,56 +128,78 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"_source": ["buildId", "benchmark", "buildTimestamp", "hasError", "metricValue"],
|
||||
"sort": [{"buildTimestamp": {"order": "asc"}}]
|
||||
"aggs": {
|
||||
"benchmark": {
|
||||
"terms": {
|
||||
"field": "benchmark.keyword",
|
||||
"size": 500
|
||||
},
|
||||
"aggs": {
|
||||
"name": {
|
||||
"terms": {
|
||||
"field": "name.keyword",
|
||||
"size": 500
|
||||
},
|
||||
"aggs": {
|
||||
"values": {
|
||||
"auto_date_histogram": {
|
||||
"buckets": 500,
|
||||
"field": "buildTimestamp",
|
||||
"minimum_interval": "hour"
|
||||
},
|
||||
"aggs": {
|
||||
"buildId": {
|
||||
"terms": {
|
||||
"size": 1,
|
||||
"field": "buildId"
|
||||
}
|
||||
},
|
||||
"avgValue":{
|
||||
"avg": {
|
||||
"field": "metricValue"
|
||||
}
|
||||
},
|
||||
"avgError":{
|
||||
"avg": {
|
||||
"field": "metricError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"format": {"property": "hits.hits"},
|
||||
"format": {"property": "aggregations"},
|
||||
"comment": "we need to have follow data: \"buildId\", \"metricName\", \"metricValue\" and \"metricError\"",
|
||||
"comment": "so it has to be array of {\"buildId\": \"...\", \"metricName\": \"...\", \"metricValue\": ..., \"metricError\": ...}",
|
||||
"transform": [
|
||||
{"type": "collect","sort": {"field": "_source.buildTimestamp"}},
|
||||
{
|
||||
"comment": "make alias: _source.buildId -> buildId",
|
||||
"type": "formula",
|
||||
"as": "buildId",
|
||||
"expr": "datum._source.buildId"
|
||||
},
|
||||
{
|
||||
"comment": "make alias: _source.benchmark -> metricName",
|
||||
"type": "formula",
|
||||
"as": "metricName",
|
||||
"expr": "datum._source.benchmark"
|
||||
},
|
||||
{
|
||||
"comment": "make alias: _source.metricValue -> metricValue",
|
||||
"type": "formula",
|
||||
"as": "metricValue",
|
||||
"expr": "datum._source.metricValue"
|
||||
},
|
||||
{
|
||||
"comment": "define metricError",
|
||||
"type": "formula",
|
||||
"as": "metricError",
|
||||
"expr": "1"
|
||||
},
|
||||
{
|
||||
"comment": "make alias: _source.hasError -> hasError",
|
||||
"type": "formula",
|
||||
"as": "hasError",
|
||||
"expr": "datum._source.metrics ? datum._source.hasError : false"
|
||||
},
|
||||
{"type": "project", "fields": ["benchmark"]},
|
||||
{"type": "flatten", "fields": ["benchmark.buckets"], "as": ["benchmark_buckets"]},
|
||||
{"type": "project", "fields": ["benchmark_buckets.key", "benchmark_buckets.name"], "as": ["benchmark", "benchmark_buckets_name"]},
|
||||
{"type": "flatten", "fields": ["benchmark_buckets_name.buckets"], "as": ["name_buckets"]},
|
||||
{"type": "project", "fields": ["benchmark", "name_buckets.key", "name_buckets.values"], "as": ["benchmark", "name", "name_values"]},
|
||||
{"type": "flatten", "fields": ["name_values.buckets"], "as": ["name_values_buckets"]},
|
||||
{"type": "project", "fields": ["benchmark", "name", "name_values_buckets.key", "name_values_buckets.key_as_string", "name_values_buckets.avgError", "name_values_buckets.avgValue", "name_values_buckets.buildId.buckets"], "as": ["metricName", "name", "buildTimestamp", "timestamp_value", "avgError", "avgValue", "buildId_buckets"]},
|
||||
{"type": "formula", "as": "metricError", "expr": "datum.avgError.value"},
|
||||
{"type": "formula", "as": "metricValue", "expr": "datum.avgValue.value"},
|
||||
{"type": "flatten", "fields": ["buildId_buckets"], "as": ["buildId_values"]},
|
||||
{"type": "formula", "as": "buildId", "expr": "datum.buildId_values.key"},
|
||||
{
|
||||
"type": "formula",
|
||||
"as": "timestamp",
|
||||
"expr": "timeFormat(toDate(datum._source.buildTimestamp), '%Y-%m-%d %H:%M')"
|
||||
"expr": "timeFormat(toDate(datum.buildTimestamp), '%Y-%m-%d %H:%M')"
|
||||
},
|
||||
{
|
||||
"comment": "create `url` value that points to TC build",
|
||||
"type": "formula",
|
||||
"as": "url",
|
||||
"expr": "'https://buildserver.labs.intellij.net/buildConfiguration/Kotlin_Benchmarks_PluginPerformanceTests_IdeaPluginPerformanceTests/' + datum._source.buildId"
|
||||
}
|
||||
"expr": "'https://buildserver.labs.intellij.net/buildConfiguration/Kotlin_Benchmarks_PluginPerformanceTests_IdeaPluginPerformanceTests/' + datum.buildId"
|
||||
},
|
||||
{"type": "collect","sort": {"field": "timestamp"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
+68
-64
@@ -6,8 +6,8 @@
|
||||
{
|
||||
"note": "May https://vega.github.io/vega/docs/ be with you",
|
||||
"$schema": "https://vega.github.io/schema/vega/v4.3.0.json",
|
||||
"description": "The Kotlin sources: highlight build.gradle.kts (geom mean)",
|
||||
"title": "The Kotlin sources: highlight build.gradle.kts (geom mean)",
|
||||
"description": "The Kotlin sources: highlight build.gradle.kts",
|
||||
"title": "The Kotlin sources: highlight build.gradle.kts",
|
||||
"width": 800,
|
||||
"height": 500,
|
||||
"padding": 5,
|
||||
@@ -95,25 +95,7 @@
|
||||
"name": "table",
|
||||
"comment": "To test chart in VEGA editor https://vega.github.io/editor/#/ change `_values` to `values` and rename `url` property",
|
||||
"_values": {
|
||||
"hits" : {
|
||||
"hits" : [
|
||||
{
|
||||
"_source" : {"buildId" : 87834896, "buildTimestamp" : "2020-09-21T21:00:31+0000", "metricValue" : 37, "benchmark" : "addImport"}
|
||||
},
|
||||
{
|
||||
"_source" : {"buildId" : 87783396, "buildTimestamp" : "2020-09-21T12:34:19+0000", "metricValue" : 37, "benchmark" : "addImport"}
|
||||
},
|
||||
{
|
||||
"_source" : {"buildId" : 87809918, "buildTimestamp" : "2020-09-21T16:47:11+0000", "metricValue" : 37, "benchmark" : "addImport"}
|
||||
},
|
||||
{
|
||||
"_source" : {"buildId" : 87905203, "buildTimestamp" : "2020-09-22T13:23:44+0000", "metricValue" : 37, "benchmark" : "addImport"}
|
||||
},
|
||||
{
|
||||
"_source" : {"buildId" : 87894638, "buildTimestamp" : "2020-09-22T09:12:16+0000", "metricValue" : 37, "benchmark" : "addImport"}
|
||||
}
|
||||
]
|
||||
}
|
||||
"comment": "same as `TestData highlight - vega.js`"
|
||||
},
|
||||
"url": {
|
||||
//"comment": "source index pattern",
|
||||
@@ -121,15 +103,16 @@
|
||||
//"comment": "it's a body of ES _search query to check query place it into `POST /kotlin_ide_benchmarks*/_search`",
|
||||
//"comment": "it uses Kibana specific %timefilter% for time frame selection",
|
||||
"body": {
|
||||
"size": 1000,
|
||||
"size": 0,
|
||||
"query": {
|
||||
"bool": {
|
||||
"must": [
|
||||
{"exists": {"field": "synthetic"}},
|
||||
{"range": {"buildTimestamp": {"%timefilter%": true}}},
|
||||
{
|
||||
"bool": {
|
||||
"must_not": [
|
||||
{"exists": {"field": "warmUp"}}
|
||||
{"exists": {"field": "synthetic"}},
|
||||
{"term": {"name.keyword": "open project kotlin"}}
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -140,62 +123,83 @@
|
||||
]
|
||||
}
|
||||
}
|
||||
{"term": {"name.keyword": "geomMean"}},
|
||||
{"range": {"buildTimestamp": {"%timefilter%": true}}}
|
||||
]
|
||||
}
|
||||
},
|
||||
"_source": ["buildId", "benchmark", "buildTimestamp", "hasError", "metricValue"],
|
||||
"sort": [{"buildTimestamp": {"order": "asc"}}]
|
||||
"aggs": {
|
||||
"benchmark": {
|
||||
"terms": {
|
||||
"field": "benchmark.keyword",
|
||||
"size": 500
|
||||
},
|
||||
"aggs": {
|
||||
"name": {
|
||||
"terms": {
|
||||
"field": "name.keyword",
|
||||
"size": 500
|
||||
},
|
||||
"aggs": {
|
||||
"values": {
|
||||
"auto_date_histogram": {
|
||||
"buckets": 500,
|
||||
"field": "buildTimestamp",
|
||||
"minimum_interval": "hour"
|
||||
},
|
||||
"aggs": {
|
||||
"buildId": {
|
||||
"terms": {
|
||||
"size": 1,
|
||||
"field": "buildId"
|
||||
}
|
||||
},
|
||||
"avgValue":{
|
||||
"avg": {
|
||||
"field": "metricValue"
|
||||
}
|
||||
},
|
||||
"avgError":{
|
||||
"avg": {
|
||||
"field": "metricError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"format": {"property": "hits.hits"},
|
||||
"format": {"property": "aggregations"},
|
||||
"comment": "we need to have follow data: \"buildId\", \"metricName\", \"metricValue\" and \"metricError\"",
|
||||
"comment": "so it has to be array of {\"buildId\": \"...\", \"metricName\": \"...\", \"metricValue\": ..., \"metricError\": ...}",
|
||||
"transform": [
|
||||
{"type": "collect","sort": {"field": "_source.buildTimestamp"}},
|
||||
{
|
||||
"comment": "make alias: _source.buildId -> buildId",
|
||||
"type": "formula",
|
||||
"as": "buildId",
|
||||
"expr": "datum._source.buildId"
|
||||
},
|
||||
{
|
||||
"comment": "make alias: _source.benchmark -> metricName",
|
||||
"type": "formula",
|
||||
"as": "metricName",
|
||||
"expr": "datum._source.benchmark"
|
||||
},
|
||||
{
|
||||
"comment": "make alias: _source.metricValue -> metricValue",
|
||||
"type": "formula",
|
||||
"as": "metricValue",
|
||||
"expr": "datum._source.metricValue"
|
||||
},
|
||||
{
|
||||
"comment": "define metricError",
|
||||
"type": "formula",
|
||||
"as": "metricError",
|
||||
"expr": "1"
|
||||
},
|
||||
{
|
||||
"comment": "make alias: _source.hasError -> hasError",
|
||||
"type": "formula",
|
||||
"as": "hasError",
|
||||
"expr": "datum._source.metrics ? datum._source.hasError : false"
|
||||
},
|
||||
{"type": "project", "fields": ["benchmark"]},
|
||||
{"type": "flatten", "fields": ["benchmark.buckets"], "as": ["benchmark_buckets"]},
|
||||
{"type": "project", "fields": ["benchmark_buckets.key", "benchmark_buckets.name"], "as": ["benchmark", "benchmark_buckets_name"]},
|
||||
{"type": "flatten", "fields": ["benchmark_buckets_name.buckets"], "as": ["name_buckets"]},
|
||||
{"type": "project", "fields": ["benchmark", "name_buckets.key", "name_buckets.values"], "as": ["benchmark", "name", "name_values"]},
|
||||
{"type": "flatten", "fields": ["name_values.buckets"], "as": ["name_values_buckets"]},
|
||||
{"type": "project", "fields": ["benchmark", "name", "name_values_buckets.key", "name_values_buckets.key_as_string", "name_values_buckets.avgError", "name_values_buckets.avgValue", "name_values_buckets.buildId.buckets"], "as": ["benchmark", "metricName", "buildTimestamp", "timestamp_value", "avgError", "avgValue", "buildId_buckets"]},
|
||||
{"type": "formula", "as": "metricError", "expr": "datum.avgError.value"},
|
||||
{"type": "formula", "as": "metricValue", "expr": "datum.avgValue.value"},
|
||||
{"type": "flatten", "fields": ["buildId_buckets"], "as": ["buildId_values"]},
|
||||
{"type": "formula", "as": "buildId", "expr": "datum.buildId_values.key"},
|
||||
{
|
||||
"type": "formula",
|
||||
"as": "timestamp",
|
||||
"expr": "timeFormat(toDate(datum._source.buildTimestamp), '%Y-%m-%d %H:%M')"
|
||||
"expr": "timeFormat(toDate(datum.buildTimestamp), '%Y-%m-%d %H:%M')"
|
||||
},
|
||||
{
|
||||
"comment": "create `url` value that points to TC build",
|
||||
"type": "formula",
|
||||
"as": "url",
|
||||
"expr": "'https://buildserver.labs.intellij.net/buildConfiguration/Kotlin_Benchmarks_PluginPerformanceTests_IdeaPluginPerformanceTests/' + datum._source.buildId"
|
||||
}
|
||||
"expr": "'https://buildserver.labs.intellij.net/buildConfiguration/Kotlin_Benchmarks_PluginPerformanceTests_IdeaPluginPerformanceTests/' + datum.buildId"
|
||||
},
|
||||
{"type": "collect","sort": {"field": "timestamp"}}
|
||||
]
|
||||
|
||||
},
|
||||
{
|
||||
"name": "selected",
|
||||
@@ -264,7 +268,7 @@
|
||||
"nice": false,
|
||||
"zero": true,
|
||||
"domain": {"data": "table", "field": "metricError"},
|
||||
"range": [1, 100]
|
||||
"range": [0, 100]
|
||||
}
|
||||
],
|
||||
"legends": [
|
||||
Reference in New Issue
Block a user