Cleanup requirements & tox config, update pylint
[nfvbench.git] / kibana / visualizations / ndr_capacity_pps_line_chart.json
1 {
2   $schema: https: //vega.github.io/schema/vega-lite/v2.json
3   title: "Capacity in Mpps - 0,001% loss ratio"
4   data: {
5     url: {
6       %context%: true
7       %timefield%: "@timestamp"
8       index: resu*
9       body: {
10         _source: ["@timestamp", "_source", "rate_pps", "flow_count", "frame_size", "user_label", "type"]
11       },
12       size: 10000
13     },
14     format: { property: "hits.hits" }
15   },
16
17   transform: [
18         { calculate: "datum._source['rate_pps'] / 1000000" as: "offered_load_pps"},
19         { calculate: "datum._source['flow_count']" as: "flow_count"},
20         { calculate: "isNaN(toNumber(datum._source['frame_size'])) ? 362 : toNumber(datum._source['frame_size'])" as: "frame_size"},
21         { calculate: "datum._source['user_label'] + '-' + datum._source['flow_count']" as: "label"}
22         { aggregate: [{op: "max", field: "offered_load_pps", as: "max_offered_load_pps"}], groupby: ["frame_size", "label","flow_count"]}
23     
24     ],
25   center: true,
26   hconcat: [
27   {
28       width:10,
29       selection: {
30         legendSel: {
31           type: "multi",
32           encodings: [ "color", "shape" ],
33           toggle: "event.shiftKey"
34         }
35       },
36       encoding: {
37         y: {
38           field: "label",
39           type: "nominal",
40           axis: {
41             title: "",
42             domain: false,
43             ticks: false,
44             offset: 10
45           },
46         },
47         color: {
48           condition: {
49             selection: "legendSel",
50             field: "label",
51             type: "nominal",
52             legend: null
53           },
54           value: "lightgrey"
55         }
56       },
57       mark: {
58         type: "square",
59         size: 120,
60         opacity: 1
61       }
62     },
63     {
64       width:500,
65       height:280,
66         transform: [
67           {filter: { selection: "legendSel"}}
68       
69       ],
70       mark: {
71         type: "line",
72         tooltip: true,
73         point: true
74       },
75       selection: {
76         grid: {
77           type: "interval",
78           resolve: "global",
79           bind: "scales",
80           translate: "[mousedown[!event.shiftKey], window:mouseup] > window:mousemove!",
81           zoom: "wheel![!event.shiftKey]"
82         },
83         pts: {
84           type: "single",
85           fields: ["Label"]
86         }
87         },
88       encoding: {
89         x: { field: "frame_size", type: "quantitative", title: "Frame size (bytes)", axis: {offset: 10} }
90         y: { field: "max_offered_load_pps", type: "quantitative", title: "Offered load (Mpps)" , axis: {offset: 10}  }
91         color: {field: "label", "type": "nominal",
92                "legend": null}
93         tooltip: {"field": "max_offered_load_pps", "type": "quantitative"},
94        shape: {field: "flow_count", type: "nominal"}
95         }
96     }    
97   ]
98 }