Home | History | Annotate | Download | only in templates
      1 [
      2   {
      3     "operation": "modify-overwrite-beta",
      4     "spec": {
      5       "*": {
      6         "key-name": "=concat(@(1,params.sslProvider),' ',@(1,params.bufferType))"
      7       }
      8     }
      9   },
     10   {
     11     "operation": "shift",
     12     "spec": {
     13       // pivot the data by benchmark name
     14       "*": {
     15         "key-name": {
     16           "*": { // match any value of name
     17             // go up the tree 3 levels
     18             // grab the whole array element and
     19             // write it to the output in an array
     20             // aka benchmark1[] or benchmark2[]
     21             "@(3,[&2])": "&.[]"
     22           }
     23         }
     24       }
     25     }
     26   },
     27   {
     28     "operation": "shift",
     29     "spec": {
     30       // now group the relevant data
     31       "*": { // benchmark 1 or 2
     32         "$": "&.name",
     33         "*": { // array of benchmark1 or 2
     34           "params": {
     35             "messageSize": "&3.x[]"
     36           },
     37           "primaryMetric": {
     38             "score": "&3.y[]",
     39             "scoreError": "&3.error_y.array[]"
     40           }
     41         }
     42       }
     43     }
     44   },
     45   {
     46     // now convert from a map to a top level list
     47     "operation": "shift",
     48     "spec": {
     49       // benchmark1 or benchmark2
     50       "*": "data.[#1]"
     51     }
     52   },
     53   {
     54     // add graph default stuff
     55     "operation": "modify-default-beta",
     56     "spec": {
     57       "data": {
     58         "*": {
     59           "mode": "lines+markers",
     60           "type": "scatter"
     61         }
     62       },
     63       "layout": {
     64         "autosize": true,
     65         "yaxis": {
     66           "type": "linear",
     67           "autorange": true,
     68           "title": "messages/sec"
     69         },
     70         "title": "SslEngineBenchmark.sendMessage",
     71         "showlegend": true,
     72         "xaxis": {
     73           "title": "size of message",
     74           "type": "category",
     75           "autorange": true
     76         }
     77       }
     78     }
     79   }
     80 ]
     81