charts.html

232 lines | 6.009 kB Blame History Raw Download
<script src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
<script src="highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://rawgit.com/highslide-software/pattern-fill/master/pattern-fill-v2.js"></script>
<script src="https://rawgit.com/highslide-software/pattern-fill/master/pattern-fill.js"></script>

<!-- <div id="container1"></div> -->
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<div id="container2"></div>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<div id="container3"></div>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<div id="container4" style="min-width: 310px; height: 500px; margin: 0 auto"></div>

<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<div id="container5" style="min-width: 310px; height: 500px; margin: 0 auto"></div>

<script type="text/javascript">
$(function() {

  var gfxPath = 'https://raw.githubusercontent.com/highslide-software/pattern-fill/master/graphics/';

  //Highcharts.setOptions({
  //  colors: ['#696969', '#a5a5a5', '#787878', '#e1e1e1', '#3f3f3f']
  //});

  $('#container1').highcharts({
  	//exporting: { enabled: false },

    chart: {
            type: 'column'
        },
        title: {
            text: 'Throughput'
        },
        subtitle: {
            text: '10 min execution with 5 concurrent users, random requests'
        },
        xAxis: {
            categories: [
                'Petclinic',
                'Cloud Store',
                'Shopizer',
                'OpenMRS'
            ],
            crosshair: true
        },
        yAxis: {
            min: 0,
            title: {
                text: 'Requests per second'
            }
        },
        tooltip: {
            headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
            pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
                '<td style="color:{series.color};padding:0"><b>{point.y:.1f}/s</b></td></tr>',
            footerFormat: '</table>',
            shared: true,
            useHTML: true
        },
        plotOptions: {
            column: {
                pointPadding: 0.2,
                borderWidth: 0
            }
        },
        series: [{
            name: 'Non-caching',
            data: [13.6, 20, 23, 25]

        }, {
            name: 'Developers caching',
            data: [13.6, 23, 29, 35]

        }, {
            name: 'Non-caching + monitoring',
            data: [12.6, 18, 28, 23]

        }, {
            name: 'Automated Caching + monitoring',
            data: [12.9, 23, 33, 34]

        }, {
            name: 'Automated Caching',
            data: [15.9, 26, 36, 39]

        }]
    });

    $('#container2').highcharts({
    	//exporting: { enabled: false },

      chart: {
              type: 'column'
          },
          title: {
              text: 'Cache Hit-ratio'
          },
          // subtitle: {
          //     text: '5 users, 10 requests (all available), 10 times = 500 total requests'
          // },
          xAxis: {
              categories: [
                  'Petclinic',
                  'Cloud Store',
                  'Shopizer',
                  'OpenMRS'
              ],
              crosshair: true
          },
          yAxis: {
              min: 0,
              title: {
                  text: 'Hit-ratio'
              }
          },
          tooltip: {
              headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
              pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
                  '<td style="color:{series.color};padding:0"><b>{point.y:.1f}%</b></td></tr>',
              footerFormat: '</table>',
              shared: true,
              useHTML: true
          },
          plotOptions: {
              column: {
                  pointPadding: 0.2,
                  borderWidth: 0
              }
          },
          series: [{
              name: 'Developers caching',
              data: [80, 90, 87, 70]

          }, {
              name: 'Automated Caching',
              data: [82, 95, 83, 75]

          }]
      });



      Highcharts.chart('container3', {
        title: {
            text: 'Number of handled requests overtime (cumulative)',
            x: -20 //center
        },
        subtitle: {
            text: 'Obs: for each system'
        },
        xAxis: {
            categories: ['0s', '1min', '5min', '10min', '15min', '20min', '25min','30min','35min']
        },
        yAxis: {
            title: {
                text: ' Number of handled requests overtime (cumulative)'
            },
            plotLines: [{
                value: 0,
                width: 1,
                color: '#808080'
            }]
        },
        // tooltip: {
        //     valueSuffix: 'Requests'
        // },
        tooltip: {
            headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
            pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
                '<td style="color:{series.color};padding:0"><b>{point.y:.1f}/s</b></td></tr>',
            footerFormat: '</table>',
            shared: true,
            useHTML: true
        },
        legend: {
            layout: 'vertical',
            align: 'right',
            verticalAlign: 'middle',
            borderWidth: 0
        },
        series: [{
            name: 'Adaptive Cache',
            data: [0, 3500, 15000, 30000, 50000, 75000, 105000, 140000, 190000]
        }, {
            name: 'Adaptive Cache + Monitoring',
            data: [0, 3000, 12000, 25000, 45000, 70000, 100000, 135000, 185000]
        }, {
            name: 'Manual Cache',
            data: [0, 5000, 20000, 40000, 60000, 80000, 100000, 120000, 135000]
        }, {
            name: 'Monitoring',
            data: [0, 3000, 12000, 25000, 38000, 51000, 65000, 78000, 95000]
        }, {
            name: 'Without Cache',
            data: [0, 3500, 15000, 30000, 45000, 60000, 75000, 90000, 110000]
        }]
    });

});

</script>