/*
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/
$(document).ready(function() {

    $(".click-title").mouseenter( function(    e){
        e.preventDefault();
        this.style.cursor="pointer";
    });
    $(".click-title").mousedown( function(event){
        event.preventDefault();
    });

    // Ugly code while this script is shared among several pages
    try{
        refreshHitsPerSecond(true);
    } catch(e){}
    try{
        refreshResponseTimeOverTime(true);
    } catch(e){}
    try{
        refreshResponseTimePercentiles();
    } catch(e){}
});


var responseTimePercentilesInfos = {
        data: {"result": {"minY": 20.0, "minX": 0.0, "maxY": 13014.0, "series": [{"data": [[0.0, 20.0], [0.1, 81.0], [0.2, 173.0], [0.3, 298.0], [0.4, 417.0], [0.5, 552.0], [0.6, 761.0], [0.7, 907.0], [0.8, 1027.0], [0.9, 1121.0], [1.0, 1241.0], [1.1, 1333.0], [1.2, 1437.0], [1.3, 1520.0], [1.4, 1622.0], [1.5, 1705.0], [1.6, 1801.0], [1.7, 1851.0], [1.8, 1907.0], [1.9, 1945.0], [2.0, 1979.0], [2.1, 1996.0], [2.2, 2004.0], [2.3, 2013.0], [2.4, 2026.0], [2.5, 2037.0], [2.6, 2049.0], [2.7, 2054.0], [2.8, 2062.0], [2.9, 2078.0], [3.0, 2097.0], [3.1, 2119.0], [3.2, 2133.0], [3.3, 2144.0], [3.4, 2174.0], [3.5, 2195.0], [3.6, 2210.0], [3.7, 2223.0], [3.8, 2240.0], [3.9, 2255.0], [4.0, 2272.0], [4.1, 2286.0], [4.2, 2297.0], [4.3, 2310.0], [4.4, 2326.0], [4.5, 2342.0], [4.6, 2358.0], [4.7, 2373.0], [4.8, 2392.0], [4.9, 2414.0], [5.0, 2442.0], [5.1, 4676.0], [5.2, 4868.0], [5.3, 4899.0], [5.4, 4928.0], [5.5, 4940.0], [5.6, 4987.0], [5.7, 5050.0], [5.8, 5078.0], [5.9, 5094.0], [6.0, 5102.0], [6.1, 5110.0], [6.2, 5124.0], [6.3, 5136.0], [6.4, 5145.0], [6.5, 5152.0], [6.6, 5163.0], [6.7, 5172.0], [6.8, 5180.0], [6.9, 5188.0], [7.0, 5197.0], [7.1, 5208.0], [7.2, 5223.0], [7.3, 5238.0], [7.4, 5259.0], [7.5, 5273.0], [7.6, 5287.0], [7.7, 5300.0], [7.8, 5315.0], [7.9, 5327.0], [8.0, 5342.0], [8.1, 5356.0], [8.2, 5365.0], [8.3, 5374.0], [8.4, 5388.0], [8.5, 5402.0], [8.6, 5416.0], [8.7, 5430.0], [8.8, 5439.0], [8.9, 5449.0], [9.0, 5459.0], [9.1, 5470.0], [9.2, 5479.0], [9.3, 5488.0], [9.4, 5496.0], [9.5, 5510.0], [9.6, 5525.0], [9.7, 5539.0], [9.8, 5550.0], [9.9, 5562.0], [10.0, 5580.0], [10.1, 5591.0], [10.2, 5606.0], [10.3, 5620.0], [10.4, 5628.0], [10.5, 5637.0], [10.6, 5643.0], [10.7, 5655.0], [10.8, 5666.0], [10.9, 5678.0], [11.0, 5689.0], [11.1, 5704.0], [11.2, 5717.0], [11.3, 5730.0], [11.4, 5745.0], [11.5, 5758.0], [11.6, 5770.0], [11.7, 5784.0], [11.8, 5799.0], [11.9, 5815.0], [12.0, 5833.0], [12.1, 5849.0], [12.2, 5867.0], [12.3, 5876.0], [12.4, 5886.0], [12.5, 5901.0], [12.6, 5919.0], [12.7, 5944.0], [12.8, 5948.0], [12.9, 5950.0], [13.0, 5952.0], [13.1, 5956.0], [13.2, 5960.0], [13.3, 5964.0], [13.4, 5974.0], [13.5, 5981.0], [13.6, 5986.0], [13.7, 5989.0], [13.8, 5995.0], [13.9, 6001.0], [14.0, 6018.0], [14.1, 6030.0], [14.2, 6047.0], [14.3, 6059.0], [14.4, 6085.0], [14.5, 6104.0], [14.6, 6116.0], [14.7, 6121.0], [14.8, 6126.0], [14.9, 6134.0], [15.0, 6143.0], [15.1, 6160.0], [15.2, 6178.0], [15.3, 6190.0], [15.4, 6202.0], [15.5, 6216.0], [15.6, 6233.0], [15.7, 6249.0], [15.8, 6261.0], [15.9, 6279.0], [16.0, 6299.0], [16.1, 6309.0], [16.2, 6323.0], [16.3, 6335.0], [16.4, 6343.0], [16.5, 6358.0], [16.6, 6371.0], [16.7, 6387.0], [16.8, 6398.0], [16.9, 6418.0], [17.0, 6435.0], [17.1, 6445.0], [17.2, 6463.0], [17.3, 6477.0], [17.4, 6495.0], [17.5, 6512.0], [17.6, 6526.0], [17.7, 6532.0], [17.8, 6540.0], [17.9, 6549.0], [18.0, 6555.0], [18.1, 6562.0], [18.2, 6569.0], [18.3, 6578.0], [18.4, 6585.0], [18.5, 6594.0], [18.6, 6601.0], [18.7, 6613.0], [18.8, 6625.0], [18.9, 6635.0], [19.0, 6645.0], [19.1, 6655.0], [19.2, 6663.0], [19.3, 6671.0], [19.4, 6678.0], [19.5, 6688.0], [19.6, 6704.0], [19.7, 6719.0], [19.8, 6732.0], [19.9, 6751.0], [20.0, 6761.0], [20.1, 6774.0], [20.2, 6789.0], [20.3, 6802.0], [20.4, 6813.0], [20.5, 6823.0], [20.6, 6831.0], [20.7, 6841.0], [20.8, 6852.0], [20.9, 6858.0], [21.0, 6865.0], [21.1, 6870.0], [21.2, 6874.0], [21.3, 6878.0], [21.4, 6882.0], [21.5, 6884.0], [21.6, 6887.0], [21.7, 6890.0], [21.8, 6898.0], [21.9, 6907.0], [22.0, 6916.0], [22.1, 6921.0], [22.2, 6924.0], [22.3, 6931.0], [22.4, 6937.0], [22.5, 6945.0], [22.6, 6954.0], [22.7, 6960.0], [22.8, 6967.0], [22.9, 6975.0], [23.0, 6981.0], [23.1, 6985.0], [23.2, 6990.0], [23.3, 6998.0], [23.4, 7004.0], [23.5, 7011.0], [23.6, 7019.0], [23.7, 7025.0], [23.8, 7033.0], [23.9, 7040.0], [24.0, 7049.0], [24.1, 7054.0], [24.2, 7063.0], [24.3, 7070.0], [24.4, 7079.0], [24.5, 7086.0], [24.6, 7092.0], [24.7, 7100.0], [24.8, 7106.0], [24.9, 7114.0], [25.0, 7121.0], [25.1, 7131.0], [25.2, 7137.0], [25.3, 7142.0], [25.4, 7150.0], [25.5, 7157.0], [25.6, 7163.0], [25.7, 7170.0], [25.8, 7179.0], [25.9, 7186.0], [26.0, 7192.0], [26.1, 7197.0], [26.2, 7199.0], [26.3, 7201.0], [26.4, 7203.0], [26.5, 7207.0], [26.6, 7212.0], [26.7, 7219.0], [26.8, 7226.0], [26.9, 7235.0], [27.0, 7241.0], [27.1, 7248.0], [27.2, 7255.0], [27.3, 7262.0], [27.4, 7268.0], [27.5, 7275.0], [27.6, 7282.0], [27.7, 7289.0], [27.8, 7296.0], [27.9, 7302.0], [28.0, 7310.0], [28.1, 7315.0], [28.2, 7322.0], [28.3, 7328.0], [28.4, 7334.0], [28.5, 7340.0], [28.6, 7347.0], [28.7, 7352.0], [28.8, 7359.0], [28.9, 7367.0], [29.0, 7372.0], [29.1, 7379.0], [29.2, 7386.0], [29.3, 7393.0], [29.4, 7399.0], [29.5, 7401.0], [29.6, 7406.0], [29.7, 7409.0], [29.8, 7412.0], [29.9, 7416.0], [30.0, 7419.0], [30.1, 7423.0], [30.2, 7429.0], [30.3, 7435.0], [30.4, 7441.0], [30.5, 7446.0], [30.6, 7452.0], [30.7, 7459.0], [30.8, 7465.0], [30.9, 7473.0], [31.0, 7478.0], [31.1, 7485.0], [31.2, 7489.0], [31.3, 7495.0], [31.4, 7500.0], [31.5, 7507.0], [31.6, 7512.0], [31.7, 7518.0], [31.8, 7524.0], [31.9, 7528.0], [32.0, 7530.0], [32.1, 7533.0], [32.2, 7536.0], [32.3, 7537.0], [32.4, 7539.0], [32.5, 7542.0], [32.6, 7545.0], [32.7, 7547.0], [32.8, 7549.0], [32.9, 7550.0], [33.0, 7552.0], [33.1, 7555.0], [33.2, 7558.0], [33.3, 7560.0], [33.4, 7561.0], [33.5, 7564.0], [33.6, 7566.0], [33.7, 7569.0], [33.8, 7572.0], [33.9, 7575.0], [34.0, 7579.0], [34.1, 7583.0], [34.2, 7585.0], [34.3, 7588.0], [34.4, 7590.0], [34.5, 7593.0], [34.6, 7597.0], [34.7, 7602.0], [34.8, 7607.0], [34.9, 7610.0], [35.0, 7615.0], [35.1, 7620.0], [35.2, 7624.0], [35.3, 7631.0], [35.4, 7636.0], [35.5, 7641.0], [35.6, 7646.0], [35.7, 7650.0], [35.8, 7654.0], [35.9, 7660.0], [36.0, 7664.0], [36.1, 7669.0], [36.2, 7674.0], [36.3, 7680.0], [36.4, 7687.0], [36.5, 7692.0], [36.6, 7697.0], [36.7, 7703.0], [36.8, 7709.0], [36.9, 7714.0], [37.0, 7718.0], [37.1, 7722.0], [37.2, 7728.0], [37.3, 7734.0], [37.4, 7740.0], [37.5, 7745.0], [37.6, 7751.0], [37.7, 7755.0], [37.8, 7758.0], [37.9, 7764.0], [38.0, 7769.0], [38.1, 7774.0], [38.2, 7779.0], [38.3, 7785.0], [38.4, 7790.0], [38.5, 7798.0], [38.6, 7803.0], [38.7, 7812.0], [38.8, 7819.0], [38.9, 7827.0], [39.0, 7834.0], [39.1, 7840.0], [39.2, 7848.0], [39.3, 7853.0], [39.4, 7860.0], [39.5, 7866.0], [39.6, 7872.0], [39.7, 7874.0], [39.8, 7875.0], [39.9, 7878.0], [40.0, 7880.0], [40.1, 7882.0], [40.2, 7886.0], [40.3, 7891.0], [40.4, 7898.0], [40.5, 7905.0], [40.6, 7911.0], [40.7, 7917.0], [40.8, 7923.0], [40.9, 7928.0], [41.0, 7935.0], [41.1, 7941.0], [41.2, 7947.0], [41.3, 7951.0], [41.4, 7956.0], [41.5, 7963.0], [41.6, 7967.0], [41.7, 7973.0], [41.8, 7977.0], [41.9, 7983.0], [42.0, 7990.0], [42.1, 7993.0], [42.2, 7999.0], [42.3, 8003.0], [42.4, 8010.0], [42.5, 8014.0], [42.6, 8020.0], [42.7, 8025.0], [42.8, 8029.0], [42.9, 8035.0], [43.0, 8040.0], [43.1, 8043.0], [43.2, 8049.0], [43.3, 8054.0], [43.4, 8059.0], [43.5, 8063.0], [43.6, 8068.0], [43.7, 8074.0], [43.8, 8080.0], [43.9, 8084.0], [44.0, 8091.0], [44.1, 8097.0], [44.2, 8103.0], [44.3, 8108.0], [44.4, 8114.0], [44.5, 8119.0], [44.6, 8124.0], [44.7, 8130.0], [44.8, 8138.0], [44.9, 8142.0], [45.0, 8146.0], [45.1, 8153.0], [45.2, 8156.0], [45.3, 8162.0], [45.4, 8166.0], [45.5, 8174.0], [45.6, 8178.0], [45.7, 8184.0], [45.8, 8191.0], [45.9, 8197.0], [46.0, 8205.0], [46.1, 8211.0], [46.2, 8216.0], [46.3, 8222.0], [46.4, 8227.0], [46.5, 8232.0], [46.6, 8238.0], [46.7, 8244.0], [46.8, 8248.0], [46.9, 8253.0], [47.0, 8257.0], [47.1, 8261.0], [47.2, 8268.0], [47.3, 8274.0], [47.4, 8280.0], [47.5, 8285.0], [47.6, 8291.0], [47.7, 8297.0], [47.8, 8301.0], [47.9, 8306.0], [48.0, 8312.0], [48.1, 8319.0], [48.2, 8323.0], [48.3, 8328.0], [48.4, 8333.0], [48.5, 8338.0], [48.6, 8343.0], [48.7, 8348.0], [48.8, 8354.0], [48.9, 8358.0], [49.0, 8364.0], [49.1, 8370.0], [49.2, 8375.0], [49.3, 8381.0], [49.4, 8386.0], [49.5, 8391.0], [49.6, 8396.0], [49.7, 8401.0], [49.8, 8406.0], [49.9, 8411.0], [50.0, 8416.0], [50.1, 8422.0], [50.2, 8426.0], [50.3, 8432.0], [50.4, 8437.0], [50.5, 8441.0], [50.6, 8445.0], [50.7, 8450.0], [50.8, 8453.0], [50.9, 8455.0], [51.0, 8456.0], [51.1, 8459.0], [51.2, 8461.0], [51.3, 8463.0], [51.4, 8467.0], [51.5, 8471.0], [51.6, 8475.0], [51.7, 8481.0], [51.8, 8486.0], [51.9, 8492.0], [52.0, 8497.0], [52.1, 8503.0], [52.2, 8509.0], [52.3, 8513.0], [52.4, 8520.0], [52.5, 8524.0], [52.6, 8529.0], [52.7, 8532.0], [52.8, 8537.0], [52.9, 8541.0], [53.0, 8545.0], [53.1, 8551.0], [53.2, 8555.0], [53.3, 8560.0], [53.4, 8566.0], [53.5, 8570.0], [53.6, 8577.0], [53.7, 8580.0], [53.8, 8586.0], [53.9, 8591.0], [54.0, 8597.0], [54.1, 8601.0], [54.2, 8607.0], [54.3, 8612.0], [54.4, 8616.0], [54.5, 8621.0], [54.6, 8626.0], [54.7, 8630.0], [54.8, 8637.0], [54.9, 8640.0], [55.0, 8647.0], [55.1, 8651.0], [55.2, 8657.0], [55.3, 8661.0], [55.4, 8666.0], [55.5, 8671.0], [55.6, 8676.0], [55.7, 8681.0], [55.8, 8683.0], [55.9, 8687.0], [56.0, 8689.0], [56.1, 8693.0], [56.2, 8698.0], [56.3, 8702.0], [56.4, 8708.0], [56.5, 8712.0], [56.6, 8715.0], [56.7, 8720.0], [56.8, 8724.0], [56.9, 8727.0], [57.0, 8731.0], [57.1, 8735.0], [57.2, 8738.0], [57.3, 8742.0], [57.4, 8746.0], [57.5, 8747.0], [57.6, 8749.0], [57.7, 8753.0], [57.8, 8756.0], [57.9, 8759.0], [58.0, 8765.0], [58.1, 8768.0], [58.2, 8770.0], [58.3, 8772.0], [58.4, 8774.0], [58.5, 8776.0], [58.6, 8779.0], [58.7, 8783.0], [58.8, 8787.0], [58.9, 8790.0], [59.0, 8796.0], [59.1, 8801.0], [59.2, 8804.0], [59.3, 8810.0], [59.4, 8814.0], [59.5, 8818.0], [59.6, 8823.0], [59.7, 8826.0], [59.8, 8830.0], [59.9, 8833.0], [60.0, 8838.0], [60.1, 8843.0], [60.2, 8851.0], [60.3, 8856.0], [60.4, 8861.0], [60.5, 8866.0], [60.6, 8873.0], [60.7, 8879.0], [60.8, 8883.0], [60.9, 8889.0], [61.0, 8894.0], [61.1, 8901.0], [61.2, 8907.0], [61.3, 8911.0], [61.4, 8918.0], [61.5, 8923.0], [61.6, 8929.0], [61.7, 8934.0], [61.8, 8939.0], [61.9, 8946.0], [62.0, 8951.0], [62.1, 8957.0], [62.2, 8963.0], [62.3, 8969.0], [62.4, 8975.0], [62.5, 8983.0], [62.6, 8989.0], [62.7, 8996.0], [62.8, 9002.0], [62.9, 9008.0], [63.0, 9013.0], [63.1, 9020.0], [63.2, 9027.0], [63.3, 9032.0], [63.4, 9039.0], [63.5, 9044.0], [63.6, 9051.0], [63.7, 9056.0], [63.8, 9063.0], [63.9, 9068.0], [64.0, 9074.0], [64.1, 9078.0], [64.2, 9081.0], [64.3, 9084.0], [64.4, 9090.0], [64.5, 9093.0], [64.6, 9096.0], [64.7, 9099.0], [64.8, 9104.0], [64.9, 9111.0], [65.0, 9115.0], [65.1, 9121.0], [65.2, 9126.0], [65.3, 9129.0], [65.4, 9132.0], [65.5, 9135.0], [65.6, 9138.0], [65.7, 9140.0], [65.8, 9145.0], [65.9, 9150.0], [66.0, 9154.0], [66.1, 9158.0], [66.2, 9160.0], [66.3, 9164.0], [66.4, 9169.0], [66.5, 9176.0], [66.6, 9183.0], [66.7, 9190.0], [66.8, 9197.0], [66.9, 9203.0], [67.0, 9209.0], [67.1, 9214.0], [67.2, 9222.0], [67.3, 9226.0], [67.4, 9235.0], [67.5, 9242.0], [67.6, 9248.0], [67.7, 9256.0], [67.8, 9264.0], [67.9, 9271.0], [68.0, 9277.0], [68.1, 9286.0], [68.2, 9289.0], [68.3, 9291.0], [68.4, 9293.0], [68.5, 9295.0], [68.6, 9298.0], [68.7, 9301.0], [68.8, 9306.0], [68.9, 9313.0], [69.0, 9318.0], [69.1, 9324.0], [69.2, 9330.0], [69.3, 9336.0], [69.4, 9341.0], [69.5, 9346.0], [69.6, 9350.0], [69.7, 9357.0], [69.8, 9365.0], [69.9, 9370.0], [70.0, 9378.0], [70.1, 9384.0], [70.2, 9390.0], [70.3, 9397.0], [70.4, 9404.0], [70.5, 9411.0], [70.6, 9416.0], [70.7, 9423.0], [70.8, 9430.0], [70.9, 9435.0], [71.0, 9439.0], [71.1, 9444.0], [71.2, 9451.0], [71.3, 9456.0], [71.4, 9464.0], [71.5, 9469.0], [71.6, 9474.0], [71.7, 9480.0], [71.8, 9484.0], [71.9, 9492.0], [72.0, 9500.0], [72.1, 9507.0], [72.2, 9515.0], [72.3, 9520.0], [72.4, 9525.0], [72.5, 9531.0], [72.6, 9534.0], [72.7, 9537.0], [72.8, 9539.0], [72.9, 9541.0], [73.0, 9542.0], [73.1, 9543.0], [73.2, 9544.0], [73.3, 9546.0], [73.4, 9547.0], [73.5, 9549.0], [73.6, 9550.0], [73.7, 9552.0], [73.8, 9554.0], [73.9, 9556.0], [74.0, 9560.0], [74.1, 9561.0], [74.2, 9565.0], [74.3, 9567.0], [74.4, 9570.0], [74.5, 9572.0], [74.6, 9575.0], [74.7, 9579.0], [74.8, 9584.0], [74.9, 9589.0], [75.0, 9593.0], [75.1, 9595.0], [75.2, 9596.0], [75.3, 9598.0], [75.4, 9600.0], [75.5, 9602.0], [75.6, 9604.0], [75.7, 9607.0], [75.8, 9611.0], [75.9, 9615.0], [76.0, 9620.0], [76.1, 9623.0], [76.2, 9625.0], [76.3, 9626.0], [76.4, 9628.0], [76.5, 9630.0], [76.6, 9631.0], [76.7, 9633.0], [76.8, 9635.0], [76.9, 9638.0], [77.0, 9639.0], [77.1, 9640.0], [77.2, 9642.0], [77.3, 9643.0], [77.4, 9644.0], [77.5, 9645.0], [77.6, 9645.0], [77.7, 9647.0], [77.8, 9648.0], [77.9, 9649.0], [78.0, 9651.0], [78.1, 9653.0], [78.2, 9654.0], [78.3, 9656.0], [78.4, 9658.0], [78.5, 9660.0], [78.6, 9661.0], [78.7, 9662.0], [78.8, 9665.0], [78.9, 9667.0], [79.0, 9669.0], [79.1, 9672.0], [79.2, 9675.0], [79.3, 9678.0], [79.4, 9681.0], [79.5, 9684.0], [79.6, 9688.0], [79.7, 9691.0], [79.8, 9693.0], [79.9, 9694.0], [80.0, 9695.0], [80.1, 9698.0], [80.2, 9700.0], [80.3, 9702.0], [80.4, 9703.0], [80.5, 9705.0], [80.6, 9708.0], [80.7, 9711.0], [80.8, 9713.0], [80.9, 9717.0], [81.0, 9720.0], [81.1, 9725.0], [81.2, 9728.0], [81.3, 9732.0], [81.4, 9736.0], [81.5, 9742.0], [81.6, 9747.0], [81.7, 9751.0], [81.8, 9757.0], [81.9, 9760.0], [82.0, 9763.0], [82.1, 9767.0], [82.2, 9773.0], [82.3, 9779.0], [82.4, 9783.0], [82.5, 9785.0], [82.6, 9788.0], [82.7, 9790.0], [82.8, 9792.0], [82.9, 9793.0], [83.0, 9795.0], [83.1, 9797.0], [83.2, 9799.0], [83.3, 9803.0], [83.4, 9805.0], [83.5, 9806.0], [83.6, 9811.0], [83.7, 9813.0], [83.8, 9815.0], [83.9, 9817.0], [84.0, 9819.0], [84.1, 9823.0], [84.2, 9825.0], [84.3, 9829.0], [84.4, 9834.0], [84.5, 9838.0], [84.6, 9841.0], [84.7, 9845.0], [84.8, 9850.0], [84.9, 9852.0], [85.0, 9856.0], [85.1, 9859.0], [85.2, 9863.0], [85.3, 9867.0], [85.4, 9870.0], [85.5, 9875.0], [85.6, 9878.0], [85.7, 9884.0], [85.8, 9886.0], [85.9, 9890.0], [86.0, 9896.0], [86.1, 9899.0], [86.2, 9904.0], [86.3, 9910.0], [86.4, 9913.0], [86.5, 9918.0], [86.6, 9921.0], [86.7, 9927.0], [86.8, 9933.0], [86.9, 9939.0], [87.0, 9944.0], [87.1, 9948.0], [87.2, 9952.0], [87.3, 9957.0], [87.4, 9961.0], [87.5, 9963.0], [87.6, 9966.0], [87.7, 9970.0], [87.8, 9973.0], [87.9, 9979.0], [88.0, 9982.0], [88.1, 9985.0], [88.2, 9988.0], [88.3, 9991.0], [88.4, 9993.0], [88.5, 9994.0], [88.6, 9996.0], [88.7, 10000.0], [88.8, 10007.0], [88.9, 10014.0], [89.0, 10020.0], [89.1, 10025.0], [89.2, 10030.0], [89.3, 10036.0], [89.4, 10041.0], [89.5, 10045.0], [89.6, 10050.0], [89.7, 10057.0], [89.8, 10063.0], [89.9, 10072.0], [90.0, 10080.0], [90.1, 10088.0], [90.2, 10096.0], [90.3, 10103.0], [90.4, 10111.0], [90.5, 10117.0], [90.6, 10123.0], [90.7, 10129.0], [90.8, 10134.0], [90.9, 10141.0], [91.0, 10147.0], [91.1, 10155.0], [91.2, 10161.0], [91.3, 10166.0], [91.4, 10170.0], [91.5, 10177.0], [91.6, 10186.0], [91.7, 10196.0], [91.8, 10207.0], [91.9, 10218.0], [92.0, 10230.0], [92.1, 10241.0], [92.2, 10252.0], [92.3, 10261.0], [92.4, 10271.0], [92.5, 10279.0], [92.6, 10288.0], [92.7, 10296.0], [92.8, 10307.0], [92.9, 10317.0], [93.0, 10327.0], [93.1, 10338.0], [93.2, 10348.0], [93.3, 10359.0], [93.4, 10369.0], [93.5, 10380.0], [93.6, 10393.0], [93.7, 10405.0], [93.8, 10416.0], [93.9, 10426.0], [94.0, 10437.0], [94.1, 10448.0], [94.2, 10460.0], [94.3, 10473.0], [94.4, 10485.0], [94.5, 10499.0], [94.6, 10514.0], [94.7, 10529.0], [94.8, 10543.0], [94.9, 10559.0], [95.0, 10578.0], [95.1, 10600.0], [95.2, 10613.0], [95.3, 10633.0], [95.4, 10650.0], [95.5, 10666.0], [95.6, 10683.0], [95.7, 10699.0], [95.8, 10717.0], [95.9, 10746.0], [96.0, 10774.0], [96.1, 10806.0], [96.2, 10838.0], [96.3, 10871.0], [96.4, 10907.0], [96.5, 10949.0], [96.6, 10986.0], [96.7, 11024.0], [96.8, 11062.0], [96.9, 11101.0], [97.0, 11136.0], [97.1, 11177.0], [97.2, 11242.0], [97.3, 11303.0], [97.4, 11396.0], [97.5, 11476.0], [97.6, 11575.0], [97.7, 11580.0], [97.8, 11588.0], [97.9, 11600.0], [98.0, 11694.0], [98.1, 11794.0], [98.2, 11871.0], [98.3, 11899.0], [98.4, 11904.0], [98.5, 11910.0], [98.6, 11916.0], [98.7, 11939.0], [98.8, 11967.0], [98.9, 11974.0], [99.0, 11990.0], [99.1, 12150.0], [99.2, 12232.0], [99.3, 12312.0], [99.4, 12384.0], [99.5, 12466.0], [99.6, 12519.0], [99.7, 12529.0], [99.8, 12582.0], [99.9, 12775.0]], "isOverall": false, "label": "city_brain", "isController": false}], "supportsControllersDiscrimination": true, "maxX": 100.0, "title": "Response Time Percentiles"}},
        getOptions: function() {
            return {
                series: {
                    points: { show: false }
                },
                legend: {
                    noColumns: 2,
                    show: true,
                    container: '#legendResponseTimePercentiles'
                },
                xaxis: {
                    tickDecimals: 1,
                    axisLabel: "Percentiles",
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                },
                yaxis: {
                    axisLabel: "Percentile value in ms",
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20
                },
                grid: {
                    hoverable: true // IMPORTANT! this is needed for tooltip to
                                    // work
                },
                tooltip: true,
                tooltipOpts: {
                    content: "%s : %x.2 percentile was %y ms"
                },
                selection: { mode: "xy" },
            };
        },
        createGraph: function() {
            var data = this.data;
            var dataset = prepareData(data.result.series, $("#choicesResponseTimePercentiles"));
            var options = this.getOptions();
            prepareOptions(options, data);
            $.plot($("#flotResponseTimesPercentiles"), dataset, options);
            // setup overview
            $.plot($("#overviewResponseTimesPercentiles"), dataset, prepareOverviewOptions(options));
        }
};

/**
 * @param elementId Id of element where we display message
 */
function setEmptyGraph(elementId) {
    $(function() {
        $(elementId).text("No graph series with filter="+seriesFilter);
    });
}

// Response times percentiles
function refreshResponseTimePercentiles() {
    var infos = responseTimePercentilesInfos;
    prepareSeries(infos.data);
    if(infos.data.result.series.length == 0) {
        setEmptyGraph("#bodyResponseTimePercentiles");
        return;
    }
    if (isGraph($("#flotResponseTimesPercentiles"))){
        infos.createGraph();
    } else {
        var choiceContainer = $("#choicesResponseTimePercentiles");
        createLegend(choiceContainer, infos);
        infos.createGraph();
        setGraphZoomable("#flotResponseTimesPercentiles", "#overviewResponseTimesPercentiles");
        $('#bodyResponseTimePercentiles .legendColorBox > div').each(function(i){
            $(this).clone().prependTo(choiceContainer.find("li").eq(i));
        });
    }
}

var responseTimeDistributionInfos = {
        data: {"result": {"minY": 1.0, "minX": 0.0, "maxY": 1266.0, "series": [{"data": [[0.0, 33.0], [100.0, 32.0], [200.0, 16.0], [300.0, 20.0], [400.0, 17.0], [500.0, 18.0], [600.0, 8.0], [700.0, 21.0], [800.0, 18.0], [900.0, 19.0], [1000.0, 29.0], [1100.0, 22.0], [1200.0, 30.0], [1300.0, 26.0], [1400.0, 26.0], [1500.0, 31.0], [1600.0, 26.0], [1700.0, 29.0], [1800.0, 49.0], [1900.0, 93.0], [2000.0, 231.0], [2100.0, 134.0], [2200.0, 186.0], [2300.0, 167.0], [2400.0, 62.0], [2500.0, 2.0], [2800.0, 1.0], [4600.0, 4.0], [4800.0, 33.0], [4700.0, 16.0], [5000.0, 89.0], [5100.0, 286.0], [4900.0, 84.0], [5300.0, 209.0], [5200.0, 172.0], [5400.0, 252.0], [5500.0, 191.0], [5600.0, 239.0], [5700.0, 194.0], [5800.0, 184.0], [6100.0, 235.0], [5900.0, 357.0], [6000.0, 165.0], [6200.0, 168.0], [6300.0, 211.0], [6500.0, 303.0], [6600.0, 264.0], [6400.0, 166.0], [6700.0, 183.0], [6800.0, 406.0], [6900.0, 406.0], [7000.0, 354.0], [7100.0, 409.0], [7300.0, 422.0], [7200.0, 424.0], [7400.0, 512.0], [7600.0, 526.0], [7500.0, 861.0], [7700.0, 498.0], [7800.0, 500.0], [7900.0, 472.0], [8000.0, 509.0], [8100.0, 474.0], [8200.0, 477.0], [8300.0, 510.0], [8600.0, 573.0], [8500.0, 532.0], [8700.0, 750.0], [8400.0, 628.0], [8800.0, 525.0], [8900.0, 447.0], [9000.0, 516.0], [9100.0, 567.0], [9200.0, 479.0], [9300.0, 439.0], [9400.0, 437.0], [9500.0, 897.0], [9600.0, 1266.0], [9700.0, 799.0], [9800.0, 765.0], [9900.0, 680.0], [10000.0, 409.0], [10100.0, 393.0], [10200.0, 264.0], [10400.0, 223.0], [10300.0, 247.0], [10500.0, 155.0], [10600.0, 161.0], [10700.0, 98.0], [10800.0, 77.0], [10900.0, 71.0], [11100.0, 64.0], [11200.0, 41.0], [11000.0, 68.0], [11700.0, 27.0], [11300.0, 30.0], [11600.0, 28.0], [11400.0, 28.0], [11500.0, 101.0], [12000.0, 12.0], [12100.0, 30.0], [12200.0, 31.0], [11900.0, 183.0], [11800.0, 57.0], [12400.0, 34.0], [12300.0, 31.0], [12500.0, 72.0], [12700.0, 14.0], [12600.0, 15.0], [12800.0, 11.0], [13000.0, 10.0]], "isOverall": false, "label": "city_brain", "isController": false}], "supportsControllersDiscrimination": true, "granularity": 100, "maxX": 13000.0, "title": "Response Time Distribution"}},
        getOptions: function() {
            var granularity = this.data.result.granularity;
            return {
                legend: {
                    noColumns: 2,
                    show: true,
                    container: '#legendResponseTimeDistribution'
                },
                xaxis:{
                    axisLabel: "Response times in ms",
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                },
                yaxis: {
                    axisLabel: "Number of responses",
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                },
                bars : {
                    show: true,
                    barWidth: this.data.result.granularity
                },
                grid: {
                    hoverable: true // IMPORTANT! this is needed for tooltip to
                                    // work
                },
                tooltip: true,
                tooltipOpts: {
                    content: function(label, xval, yval, flotItem){
                        return yval + " responses for " + label + " were between " + xval + " and " + (xval + granularity) + " ms";
                    }
                }
            };
        },
        createGraph: function() {
            var data = this.data;
            var options = this.getOptions();
            prepareOptions(options, data);
            $.plot($("#flotResponseTimeDistribution"), prepareData(data.result.series, $("#choicesResponseTimeDistribution")), options);
        }

};

// Response time distribution
function refreshResponseTimeDistribution() {
    var infos = responseTimeDistributionInfos;
    prepareSeries(infos.data);
    if(infos.data.result.series.length == 0) {
        setEmptyGraph("#bodyResponseTimeDistribution");
        return;
    }
    if (isGraph($("#flotResponseTimeDistribution"))){
        infos.createGraph();
    }else{
        var choiceContainer = $("#choicesResponseTimeDistribution");
        createLegend(choiceContainer, infos);
        infos.createGraph();
        $('#footerResponseTimeDistribution .legendColorBox > div').each(function(i){
            $(this).clone().prependTo(choiceContainer.find("li").eq(i));
        });
    }
};


var syntheticResponseTimeDistributionInfos = {
        data: {"result": {"minY": 118.0, "minX": 0.0, "ticks": [[0, "Requests having \nresponse time <= 500ms"], [1, "Requests having \nresponse time > 500ms and <= 1,500ms"], [2, "Requests having \nresponse time > 1,500ms"], [3, "Requests in error"]], "maxY": 26061.0, "series": [{"data": [[0.0, 118.0]], "color": "#9ACD32", "isOverall": false, "label": "Requests having \nresponse time <= 500ms", "isController": false}, {"data": [[1.0, 217.0]], "color": "yellow", "isOverall": false, "label": "Requests having \nresponse time > 500ms and <= 1,500ms", "isController": false}, {"data": [[2.0, 26061.0]], "color": "orange", "isOverall": false, "label": "Requests having \nresponse time > 1,500ms", "isController": false}, {"data": [], "color": "#FF6347", "isOverall": false, "label": "Requests in error", "isController": false}], "supportsControllersDiscrimination": false, "maxX": 2.0, "title": "Synthetic Response Times Distribution"}},
        getOptions: function() {
            return {
                legend: {
                    noColumns: 2,
                    show: true,
                    container: '#legendSyntheticResponseTimeDistribution'
                },
                xaxis:{
                    axisLabel: "Response times ranges",
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                    tickLength:0,
                    min:-0.5,
                    max:3.5
                },
                yaxis: {
                    axisLabel: "Number of responses",
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                },
                bars : {
                    show: true,
                    align: "center",
                    barWidth: 0.25,
                    fill:.75
                },
                grid: {
                    hoverable: true // IMPORTANT! this is needed for tooltip to
                                    // work
                },
                tooltip: true,
                tooltipOpts: {
                    content: function(label, xval, yval, flotItem){
                        return yval + " " + label;
                    }
                }
            };
        },
        createGraph: function() {
            var data = this.data;
            var options = this.getOptions();
            prepareOptions(options, data);
            options.xaxis.ticks = data.result.ticks;
            $.plot($("#flotSyntheticResponseTimeDistribution"), prepareData(data.result.series, $("#choicesSyntheticResponseTimeDistribution")), options);
        }

};

// Response time distribution
function refreshSyntheticResponseTimeDistribution() {
    var infos = syntheticResponseTimeDistributionInfos;
    prepareSeries(infos.data, true);
    if (isGraph($("#flotSyntheticResponseTimeDistribution"))){
        infos.createGraph();
    }else{
        var choiceContainer = $("#choicesSyntheticResponseTimeDistribution");
        createLegend(choiceContainer, infos);
        infos.createGraph();
        $('#footerSyntheticResponseTimeDistribution .legendColorBox > div').each(function(i){
            $(this).clone().prependTo(choiceContainer.find("li").eq(i));
        });
    }
};

var activeThreadsOverTimeInfos = {
        data: {"result": {"minY": 43.538722826086826, "minX": 1.60811346E12, "maxY": 60.0, "series": [{"data": [[1.60811364E12, 43.538722826086826], [1.60811346E12, 54.35930110352078], [1.60811358E12, 60.0], [1.60811352E12, 60.0]], "isOverall": false, "label": "jp@gc - Ultimate Thread Group", "isController": false}], "supportsControllersDiscrimination": false, "granularity": 60000, "maxX": 1.60811364E12, "title": "Active Threads Over Time"}},
        getOptions: function() {
            return {
                series: {
                    stack: true,
                    lines: {
                        show: true,
                        fill: true
                    },
                    points: {
                        show: true
                    }
                },
                xaxis: {
                    mode: "time",
                    timeformat: getTimeFormat(this.data.result.granularity),
                    axisLabel: getElapsedTimeLabel(this.data.result.granularity),
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                },
                yaxis: {
                    axisLabel: "Number of active threads",
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20
                },
                legend: {
                    noColumns: 6,
                    show: true,
                    container: '#legendActiveThreadsOverTime'
                },
                grid: {
                    hoverable: true // IMPORTANT! this is needed for tooltip to
                                    // work
                },
                selection: {
                    mode: 'xy'
                },
                tooltip: true,
                tooltipOpts: {
                    content: "%s : At %x there were %y active threads"
                }
            };
        },
        createGraph: function() {
            var data = this.data;
            var dataset = prepareData(data.result.series, $("#choicesActiveThreadsOverTime"));
            var options = this.getOptions();
            prepareOptions(options, data);
            $.plot($("#flotActiveThreadsOverTime"), dataset, options);
            // setup overview
            $.plot($("#overviewActiveThreadsOverTime"), dataset, prepareOverviewOptions(options));
        }
};

// Active Threads Over Time
function refreshActiveThreadsOverTime(fixTimestamps) {
    var infos = activeThreadsOverTimeInfos;
    prepareSeries(infos.data);
    if(fixTimestamps) {
        fixTimeStamps(infos.data.result.series, 28800000);
    }
    if(isGraph($("#flotActiveThreadsOverTime"))) {
        infos.createGraph();
    }else{
        var choiceContainer = $("#choicesActiveThreadsOverTime");
        createLegend(choiceContainer, infos);
        infos.createGraph();
        setGraphZoomable("#flotActiveThreadsOverTime", "#overviewActiveThreadsOverTime");
        $('#footerActiveThreadsOverTime .legendColorBox > div').each(function(i){
            $(this).clone().prependTo(choiceContainer.find("li").eq(i));
        });
    }
};

var timeVsThreadsInfos = {
        data: {"result": {"minY": 1750.0936708860766, "minX": 1.0, "maxY": 8612.052631578947, "series": [{"data": [[2.0, 7784.857142857142], [3.0, 6261.923076923076], [4.0, 4201.592592592592], [5.0, 3750.5625], [6.0, 2746.0357142857147], [7.0, 3345.677419354839], [8.0, 4664.555555555556], [9.0, 4682.482758620689], [10.0, 2455.0666666666666], [11.0, 4199.333333333333], [12.0, 4606.961538461539], [13.0, 4278.32], [14.0, 3827.5357142857147], [15.0, 4357.4285714285725], [16.0, 4594.666666666665], [17.0, 5307.240000000001], [18.0, 4061.8125], [19.0, 5596.607142857143], [20.0, 1750.0936708860766], [21.0, 3202.517241379309], [22.0, 4493.983333333333], [23.0, 3616.021276595745], [24.0, 3810.754716981131], [25.0, 4404.807017543859], [26.0, 4208.753623188407], [27.0, 4456.571428571428], [28.0, 4126.759493670885], [29.0, 4114.684210526316], [30.0, 4834.880597014926], [31.0, 4552.818181818182], [32.0, 4642.065934065934], [33.0, 4838.109375], [34.0, 4956.6794871794855], [35.0, 5176.759036144578], [36.0, 5188.103448275863], [37.0, 6927.839999999999], [38.0, 5614.283018867925], [39.0, 6192.925000000001], [40.0, 7359.659574468085], [41.0, 7303.372093023256], [43.0, 7492.54054054054], [42.0, 7422.8], [45.0, 7590.209302325582], [44.0, 7565.333333333333], [47.0, 7158.326923076924], [46.0, 7425.580000000002], [49.0, 7134.631578947368], [48.0, 7150.551020408164], [51.0, 6995.652173913042], [50.0, 6759.092307692307], [53.0, 6372.453781512604], [52.0, 6575.367521367522], [54.0, 6924.901785714283], [55.0, 6984.459854014601], [56.0, 7467.764705882352], [57.0, 7886.841269841272], [58.0, 7907.348837209302], [59.0, 8099.376543209877], [60.0, 8496.875138170391], [1.0, 8612.052631578947]], "isOverall": false, "label": "city_brain", "isController": false}, {"data": [[56.53739202909536, 8063.951394150628]], "isOverall": false, "label": "city_brain-Aggregated", "isController": false}], "supportsControllersDiscrimination": true, "maxX": 60.0, "title": "Time VS Threads"}},
        getOptions: function() {
            return {
                series: {
                    lines: {
                        show: true
                    },
                    points: {
                        show: true
                    }
                },
                xaxis: {
                    axisLabel: "Number of active threads",
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                },
                yaxis: {
                    axisLabel: "Average response times in ms",
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20
                },
                legend: { noColumns: 2,show: true, container: '#legendTimeVsThreads' },
                selection: {
                    mode: 'xy'
                },
                grid: {
                    hoverable: true // IMPORTANT! this is needed for tooltip to work
                },
                tooltip: true,
                tooltipOpts: {
                    content: "%s: At %x.2 active threads, Average response time was %y.2 ms"
                }
            };
        },
        createGraph: function() {
            var data = this.data;
            var dataset = prepareData(data.result.series, $("#choicesTimeVsThreads"));
            var options = this.getOptions();
            prepareOptions(options, data);
            $.plot($("#flotTimesVsThreads"), dataset, options);
            // setup overview
            $.plot($("#overviewTimesVsThreads"), dataset, prepareOverviewOptions(options));
        }
};

// Time vs threads
function refreshTimeVsThreads(){
    var infos = timeVsThreadsInfos;
    prepareSeries(infos.data);
    if(infos.data.result.series.length == 0) {
        setEmptyGraph("#bodyTimeVsThreads");
        return;
    }
    if(isGraph($("#flotTimesVsThreads"))){
        infos.createGraph();
    }else{
        var choiceContainer = $("#choicesTimeVsThreads");
        createLegend(choiceContainer, infos);
        infos.createGraph();
        setGraphZoomable("#flotTimesVsThreads", "#overviewTimesVsThreads");
        $('#footerTimeVsThreads .legendColorBox > div').each(function(i){
            $(this).clone().prependTo(choiceContainer.find("li").eq(i));
        });
    }
};

var bytesThroughputOverTimeInfos = {
        data : {"result": {"minY": 21835.516666666666, "minX": 1.60811346E12, "maxY": 82677.86666666667, "series": [{"data": [[1.60811364E12, 21835.516666666666], [1.60811346E12, 56440.38333333333], [1.60811358E12, 56966.38333333333], [1.60811352E12, 60524.416666666664]], "isOverall": false, "label": "Bytes received per second", "isController": false}, {"data": [[1.60811364E12, 29832.533333333333], [1.60811346E12, 77134.93333333333], [1.60811358E12, 77834.13333333333], [1.60811352E12, 82677.86666666667]], "isOverall": false, "label": "Bytes sent per second", "isController": false}], "supportsControllersDiscrimination": false, "granularity": 60000, "maxX": 1.60811364E12, "title": "Bytes Throughput Over Time"}},
        getOptions : function(){
            return {
                series: {
                    lines: {
                        show: true
                    },
                    points: {
                        show: true
                    }
                },
                xaxis: {
                    mode: "time",
                    timeformat: getTimeFormat(this.data.result.granularity),
                    axisLabel: getElapsedTimeLabel(this.data.result.granularity) ,
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                },
                yaxis: {
                    axisLabel: "Bytes / sec",
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                },
                legend: {
                    noColumns: 2,
                    show: true,
                    container: '#legendBytesThroughputOverTime'
                },
                selection: {
                    mode: "xy"
                },
                grid: {
                    hoverable: true // IMPORTANT! this is needed for tooltip to
                                    // work
                },
                tooltip: true,
                tooltipOpts: {
                    content: "%s at %x was %y"
                }
            };
        },
        createGraph : function() {
            var data = this.data;
            var dataset = prepareData(data.result.series, $("#choicesBytesThroughputOverTime"));
            var options = this.getOptions();
            prepareOptions(options, data);
            $.plot($("#flotBytesThroughputOverTime"), dataset, options);
            // setup overview
            $.plot($("#overviewBytesThroughputOverTime"), dataset, prepareOverviewOptions(options));
        }
};

// Bytes throughput Over Time
function refreshBytesThroughputOverTime(fixTimestamps) {
    var infos = bytesThroughputOverTimeInfos;
    prepareSeries(infos.data);
    if(fixTimestamps) {
        fixTimeStamps(infos.data.result.series, 28800000);
    }
    if(isGraph($("#flotBytesThroughputOverTime"))){
        infos.createGraph();
    }else{
        var choiceContainer = $("#choicesBytesThroughputOverTime");
        createLegend(choiceContainer, infos);
        infos.createGraph();
        setGraphZoomable("#flotBytesThroughputOverTime", "#overviewBytesThroughputOverTime");
        $('#footerBytesThroughputOverTime .legendColorBox > div').each(function(i){
            $(this).clone().prependTo(choiceContainer.find("li").eq(i));
        });
    }
}

var responseTimesOverTimeInfos = {
        data: {"result": {"minY": 7137.008933263284, "minX": 1.60811346E12, "maxY": 8583.584689493586, "series": [{"data": [[1.60811364E12, 7901.078804347831], [1.60811346E12, 7137.008933263284], [1.60811358E12, 8583.584689493586], [1.60811352E12, 8498.328103934262]], "isOverall": false, "label": "city_brain", "isController": false}], "supportsControllersDiscrimination": true, "granularity": 60000, "maxX": 1.60811364E12, "title": "Response Time Over Time"}},
        getOptions: function(){
            return {
                series: {
                    lines: {
                        show: true
                    },
                    points: {
                        show: true
                    }
                },
                xaxis: {
                    mode: "time",
                    timeformat: getTimeFormat(this.data.result.granularity),
                    axisLabel: getElapsedTimeLabel(this.data.result.granularity),
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                },
                yaxis: {
                    axisLabel: "Average response time in ms",
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                },
                legend: {
                    noColumns: 2,
                    show: true,
                    container: '#legendResponseTimesOverTime'
                },
                selection: {
                    mode: 'xy'
                },
                grid: {
                    hoverable: true // IMPORTANT! this is needed for tooltip to
                                    // work
                },
                tooltip: true,
                tooltipOpts: {
                    content: "%s : at %x Average response time was %y ms"
                }
            };
        },
        createGraph: function() {
            var data = this.data;
            var dataset = prepareData(data.result.series, $("#choicesResponseTimesOverTime"));
            var options = this.getOptions();
            prepareOptions(options, data);
            $.plot($("#flotResponseTimesOverTime"), dataset, options);
            // setup overview
            $.plot($("#overviewResponseTimesOverTime"), dataset, prepareOverviewOptions(options));
        }
};

// Response Times Over Time
function refreshResponseTimeOverTime(fixTimestamps) {
    var infos = responseTimesOverTimeInfos;
    prepareSeries(infos.data);
    if(infos.data.result.series.length == 0) {
        setEmptyGraph("#bodyResponseTimeOverTime");
        return;
    }
    if(fixTimestamps) {
        fixTimeStamps(infos.data.result.series, 28800000);
    }
    if(isGraph($("#flotResponseTimesOverTime"))){
        infos.createGraph();
    }else{
        var choiceContainer = $("#choicesResponseTimesOverTime");
        createLegend(choiceContainer, infos);
        infos.createGraph();
        setGraphZoomable("#flotResponseTimesOverTime", "#overviewResponseTimesOverTime");
        $('#footerResponseTimesOverTime .legendColorBox > div').each(function(i){
            $(this).clone().prependTo(choiceContainer.find("li").eq(i));
        });
    }
};

var latenciesOverTimeInfos = {
        data: {"result": {"minY": 7136.974908039941, "minX": 1.60811346E12, "maxY": 8583.566462700195, "series": [{"data": [[1.60811364E12, 7901.059782608667], [1.60811346E12, 7136.974908039941], [1.60811358E12, 8583.566462700195], [1.60811352E12, 8498.309474200238]], "isOverall": false, "label": "city_brain", "isController": false}], "supportsControllersDiscrimination": true, "granularity": 60000, "maxX": 1.60811364E12, "title": "Latencies Over Time"}},
        getOptions: function() {
            return {
                series: {
                    lines: {
                        show: true
                    },
                    points: {
                        show: true
                    }
                },
                xaxis: {
                    mode: "time",
                    timeformat: getTimeFormat(this.data.result.granularity),
                    axisLabel: getElapsedTimeLabel(this.data.result.granularity),
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                },
                yaxis: {
                    axisLabel: "Average response latencies in ms",
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                },
                legend: {
                    noColumns: 2,
                    show: true,
                    container: '#legendLatenciesOverTime'
                },
                selection: {
                    mode: 'xy'
                },
                grid: {
                    hoverable: true // IMPORTANT! this is needed for tooltip to
                                    // work
                },
                tooltip: true,
                tooltipOpts: {
                    content: "%s : at %x Average latency was %y ms"
                }
            };
        },
        createGraph: function () {
            var data = this.data;
            var dataset = prepareData(data.result.series, $("#choicesLatenciesOverTime"));
            var options = this.getOptions();
            prepareOptions(options, data);
            $.plot($("#flotLatenciesOverTime"), dataset, options);
            // setup overview
            $.plot($("#overviewLatenciesOverTime"), dataset, prepareOverviewOptions(options));
        }
};

// Latencies Over Time
function refreshLatenciesOverTime(fixTimestamps) {
    var infos = latenciesOverTimeInfos;
    prepareSeries(infos.data);
    if(infos.data.result.series.length == 0) {
        setEmptyGraph("#bodyLatenciesOverTime");
        return;
    }
    if(fixTimestamps) {
        fixTimeStamps(infos.data.result.series, 28800000);
    }
    if(isGraph($("#flotLatenciesOverTime"))) {
        infos.createGraph();
    }else {
        var choiceContainer = $("#choicesLatenciesOverTime");
        createLegend(choiceContainer, infos);
        infos.createGraph();
        setGraphZoomable("#flotLatenciesOverTime", "#overviewLatenciesOverTime");
        $('#footerLatenciesOverTime .legendColorBox > div').each(function(i){
            $(this).clone().prependTo(choiceContainer.find("li").eq(i));
        });
    }
};

var connectTimeOverTimeInfos = {
        data: {"result": {"minY": 2.1310209584507818, "minX": 1.60811346E12, "maxY": 11.415760869565219, "series": [{"data": [[1.60811364E12, 11.415760869565219], [1.60811346E12, 2.411849710982665], [1.60811358E12, 2.895195938028912], [1.60811352E12, 2.1310209584507818]], "isOverall": false, "label": "city_brain", "isController": false}], "supportsControllersDiscrimination": true, "granularity": 60000, "maxX": 1.60811364E12, "title": "Connect Time Over Time"}},
        getOptions: function() {
            return {
                series: {
                    lines: {
                        show: true
                    },
                    points: {
                        show: true
                    }
                },
                xaxis: {
                    mode: "time",
                    timeformat: getTimeFormat(this.data.result.granularity),
                    axisLabel: getConnectTimeLabel(this.data.result.granularity),
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                },
                yaxis: {
                    axisLabel: "Average Connect Time in ms",
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                },
                legend: {
                    noColumns: 2,
                    show: true,
                    container: '#legendConnectTimeOverTime'
                },
                selection: {
                    mode: 'xy'
                },
                grid: {
                    hoverable: true // IMPORTANT! this is needed for tooltip to
                                    // work
                },
                tooltip: true,
                tooltipOpts: {
                    content: "%s : at %x Average connect time was %y ms"
                }
            };
        },
        createGraph: function () {
            var data = this.data;
            var dataset = prepareData(data.result.series, $("#choicesConnectTimeOverTime"));
            var options = this.getOptions();
            prepareOptions(options, data);
            $.plot($("#flotConnectTimeOverTime"), dataset, options);
            // setup overview
            $.plot($("#overviewConnectTimeOverTime"), dataset, prepareOverviewOptions(options));
        }
};

// Connect Time Over Time
function refreshConnectTimeOverTime(fixTimestamps) {
    var infos = connectTimeOverTimeInfos;
    prepareSeries(infos.data);
    if(infos.data.result.series.length == 0) {
        setEmptyGraph("#bodyConnectTimeOverTime");
        return;
    }
    if(fixTimestamps) {
        fixTimeStamps(infos.data.result.series, 28800000);
    }
    if(isGraph($("#flotConnectTimeOverTime"))) {
        infos.createGraph();
    }else {
        var choiceContainer = $("#choicesConnectTimeOverTime");
        createLegend(choiceContainer, infos);
        infos.createGraph();
        setGraphZoomable("#flotConnectTimeOverTime", "#overviewConnectTimeOverTime");
        $('#footerConnectTimeOverTime .legendColorBox > div').each(function(i){
            $(this).clone().prependTo(choiceContainer.find("li").eq(i));
        });
    }
};

var responseTimePercentilesOverTimeInfos = {
        data: {"result": {"minY": 20.0, "minX": 1.60811346E12, "maxY": 13014.0, "series": [{"data": [[1.60811364E12, 12524.0], [1.60811346E12, 10707.0], [1.60811358E12, 11918.0], [1.60811352E12, 13014.0]], "isOverall": false, "label": "Max", "isController": false}, {"data": [[1.60811364E12, 841.0], [1.60811346E12, 20.0], [1.60811358E12, 5081.0], [1.60811352E12, 5025.0]], "isOverall": false, "label": "Min", "isController": false}, {"data": [[1.60811364E12, 10200.900000000001], [1.60811346E12, 9786.0], [1.60811358E12, 10118.0], [1.60811352E12, 10093.8]], "isOverall": false, "label": "90th percentile", "isController": false}, {"data": [[1.60811364E12, 12264.970000000005], [1.60811346E12, 10348.96], [1.60811358E12, 12258.0], [1.60811352E12, 12419.96]], "isOverall": false, "label": "99th percentile", "isController": false}, {"data": [[1.60811364E12, 10839.0], [1.60811346E12, 9854.0], [1.60811358E12, 10689.95], [1.60811352E12, 10799.0]], "isOverall": false, "label": "95th percentile", "isController": false}], "supportsControllersDiscrimination": false, "granularity": 60000, "maxX": 1.60811364E12, "title": "Response Time Percentiles Over Time (successful requests only)"}},
        getOptions: function() {
            return {
                series: {
                    lines: {
                        show: true,
                        fill: true
                    },
                    points: {
                        show: true
                    }
                },
                xaxis: {
                    mode: "time",
                    timeformat: getTimeFormat(this.data.result.granularity),
                    axisLabel: getElapsedTimeLabel(this.data.result.granularity),
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                },
                yaxis: {
                    axisLabel: "Response Time in ms",
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                },
                legend: {
                    noColumns: 2,
                    show: true,
                    container: '#legendResponseTimePercentilesOverTime'
                },
                selection: {
                    mode: 'xy'
                },
                grid: {
                    hoverable: true // IMPORTANT! this is needed for tooltip to
                                    // work
                },
                tooltip: true,
                tooltipOpts: {
                    content: "%s : at %x Response time was %y ms"
                }
            };
        },
        createGraph: function () {
            var data = this.data;
            var dataset = prepareData(data.result.series, $("#choicesResponseTimePercentilesOverTime"));
            var options = this.getOptions();
            prepareOptions(options, data);
            $.plot($("#flotResponseTimePercentilesOverTime"), dataset, options);
            // setup overview
            $.plot($("#overviewResponseTimePercentilesOverTime"), dataset, prepareOverviewOptions(options));
        }
};

// Response Time Percentiles Over Time
function refreshResponseTimePercentilesOverTime(fixTimestamps) {
    var infos = responseTimePercentilesOverTimeInfos;
    prepareSeries(infos.data);
    if(fixTimestamps) {
        fixTimeStamps(infos.data.result.series, 28800000);
    }
    if(isGraph($("#flotResponseTimePercentilesOverTime"))) {
        infos.createGraph();
    }else {
        var choiceContainer = $("#choicesResponseTimePercentilesOverTime");
        createLegend(choiceContainer, infos);
        infos.createGraph();
        setGraphZoomable("#flotResponseTimePercentilesOverTime", "#overviewResponseTimePercentilesOverTime");
        $('#footerResponseTimePercentilesOverTime .legendColorBox > div').each(function(i){
            $(this).clone().prependTo(choiceContainer.find("li").eq(i));
        });
    }
};


var responseTimeVsRequestInfos = {
    data: {"result": {"minY": 1401.0, "minX": 1000.0, "maxY": 9565.0, "series": [{"data": [[6000.0, 1401.0], [3000.0, 9565.0], [1000.0, 8627.0], [2000.0, 8233.0]], "isOverall": false, "label": "Successes", "isController": false}], "supportsControllersDiscrimination": false, "granularity": 1, "maxX": 6000.0, "title": "Response Time Vs Request"}},
    getOptions: function() {
        return {
            series: {
                lines: {
                    show: false
                },
                points: {
                    show: true
                }
            },
            xaxis: {
                axisLabel: "Global number of requests per second",
                axisLabelUseCanvas: true,
                axisLabelFontSizePixels: 12,
                axisLabelFontFamily: 'Verdana, Arial',
                axisLabelPadding: 20,
            },
            yaxis: {
                axisLabel: "Median Response Time in ms",
                axisLabelUseCanvas: true,
                axisLabelFontSizePixels: 12,
                axisLabelFontFamily: 'Verdana, Arial',
                axisLabelPadding: 20,
            },
            legend: {
                noColumns: 2,
                show: true,
                container: '#legendResponseTimeVsRequest'
            },
            selection: {
                mode: 'xy'
            },
            grid: {
                hoverable: true // IMPORTANT! this is needed for tooltip to work
            },
            tooltip: true,
            tooltipOpts: {
                content: "%s : Median response time at %x req/s was %y ms"
            },
            colors: ["#9ACD32", "#FF6347"]
        };
    },
    createGraph: function () {
        var data = this.data;
        var dataset = prepareData(data.result.series, $("#choicesResponseTimeVsRequest"));
        var options = this.getOptions();
        prepareOptions(options, data);
        $.plot($("#flotResponseTimeVsRequest"), dataset, options);
        // setup overview
        $.plot($("#overviewResponseTimeVsRequest"), dataset, prepareOverviewOptions(options));

    }
};

// Response Time vs Request
function refreshResponseTimeVsRequest() {
    var infos = responseTimeVsRequestInfos;
    prepareSeries(infos.data);
    if (isGraph($("#flotResponseTimeVsRequest"))){
        infos.create();
    }else{
        var choiceContainer = $("#choicesResponseTimeVsRequest");
        createLegend(choiceContainer, infos);
        infos.createGraph();
        setGraphZoomable("#flotResponseTimeVsRequest", "#overviewResponseTimeVsRequest");
        $('#footerResponseRimeVsRequest .legendColorBox > div').each(function(i){
            $(this).clone().prependTo(choiceContainer.find("li").eq(i));
        });
    }
};


var latenciesVsRequestInfos = {
    data: {"result": {"minY": 1401.0, "minX": 1000.0, "maxY": 9565.0, "series": [{"data": [[6000.0, 1401.0], [3000.0, 9565.0], [1000.0, 8627.0], [2000.0, 8233.0]], "isOverall": false, "label": "Successes", "isController": false}], "supportsControllersDiscrimination": false, "granularity": 1, "maxX": 6000.0, "title": "Latencies Vs Request"}},
    getOptions: function() {
        return{
            series: {
                lines: {
                    show: false
                },
                points: {
                    show: true
                }
            },
            xaxis: {
                axisLabel: "Global number of requests per second",
                axisLabelUseCanvas: true,
                axisLabelFontSizePixels: 12,
                axisLabelFontFamily: 'Verdana, Arial',
                axisLabelPadding: 20,
            },
            yaxis: {
                axisLabel: "Median Latency in ms",
                axisLabelUseCanvas: true,
                axisLabelFontSizePixels: 12,
                axisLabelFontFamily: 'Verdana, Arial',
                axisLabelPadding: 20,
            },
            legend: { noColumns: 2,show: true, container: '#legendLatencyVsRequest' },
            selection: {
                mode: 'xy'
            },
            grid: {
                hoverable: true // IMPORTANT! this is needed for tooltip to work
            },
            tooltip: true,
            tooltipOpts: {
                content: "%s : Median Latency time at %x req/s was %y ms"
            },
            colors: ["#9ACD32", "#FF6347"]
        };
    },
    createGraph: function () {
        var data = this.data;
        var dataset = prepareData(data.result.series, $("#choicesLatencyVsRequest"));
        var options = this.getOptions();
        prepareOptions(options, data);
        $.plot($("#flotLatenciesVsRequest"), dataset, options);
        // setup overview
        $.plot($("#overviewLatenciesVsRequest"), dataset, prepareOverviewOptions(options));
    }
};

// Latencies vs Request
function refreshLatenciesVsRequest() {
        var infos = latenciesVsRequestInfos;
        prepareSeries(infos.data);
        if(isGraph($("#flotLatenciesVsRequest"))){
            infos.createGraph();
        }else{
            var choiceContainer = $("#choicesLatencyVsRequest");
            createLegend(choiceContainer, infos);
            infos.createGraph();
            setGraphZoomable("#flotLatenciesVsRequest", "#overviewLatenciesVsRequest");
            $('#footerLatenciesVsRequest .legendColorBox > div').each(function(i){
                $(this).clone().prependTo(choiceContainer.find("li").eq(i));
            });
        }
};

var hitsPerSecondInfos = {
        data: {"result": {"minY": 30.066666666666666, "minX": 1.60811346E12, "maxY": 145.86666666666667, "series": [{"data": [[1.60811364E12, 30.066666666666666], [1.60811346E12, 145.86666666666667], [1.60811358E12, 128.03333333333333], [1.60811352E12, 135.96666666666667]], "isOverall": false, "label": "hitsPerSecond", "isController": false}], "supportsControllersDiscrimination": false, "granularity": 60000, "maxX": 1.60811364E12, "title": "Hits Per Second"}},
        getOptions: function() {
            return {
                series: {
                    lines: {
                        show: true
                    },
                    points: {
                        show: true
                    }
                },
                xaxis: {
                    mode: "time",
                    timeformat: getTimeFormat(this.data.result.granularity),
                    axisLabel: getElapsedTimeLabel(this.data.result.granularity),
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                },
                yaxis: {
                    axisLabel: "Number of hits / sec",
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20
                },
                legend: {
                    noColumns: 2,
                    show: true,
                    container: "#legendHitsPerSecond"
                },
                selection: {
                    mode : 'xy'
                },
                grid: {
                    hoverable: true // IMPORTANT! this is needed for tooltip to
                                    // work
                },
                tooltip: true,
                tooltipOpts: {
                    content: "%s at %x was %y.2 hits/sec"
                }
            };
        },
        createGraph: function createGraph() {
            var data = this.data;
            var dataset = prepareData(data.result.series, $("#choicesHitsPerSecond"));
            var options = this.getOptions();
            prepareOptions(options, data);
            $.plot($("#flotHitsPerSecond"), dataset, options);
            // setup overview
            $.plot($("#overviewHitsPerSecond"), dataset, prepareOverviewOptions(options));
        }
};

// Hits per second
function refreshHitsPerSecond(fixTimestamps) {
    var infos = hitsPerSecondInfos;
    prepareSeries(infos.data);
    if(fixTimestamps) {
        fixTimeStamps(infos.data.result.series, 28800000);
    }
    if (isGraph($("#flotHitsPerSecond"))){
        infos.createGraph();
    }else{
        var choiceContainer = $("#choicesHitsPerSecond");
        createLegend(choiceContainer, infos);
        infos.createGraph();
        setGraphZoomable("#flotHitsPerSecond", "#overviewHitsPerSecond");
        $('#footerHitsPerSecond .legendColorBox > div').each(function(i){
            $(this).clone().prependTo(choiceContainer.find("li").eq(i));
        });
    }
}

var codesPerSecondInfos = {
        data: {"result": {"minY": 49.06666666666667, "minX": 1.60811346E12, "maxY": 135.98333333333332, "series": [{"data": [[1.60811364E12, 49.06666666666667], [1.60811346E12, 126.86666666666666], [1.60811358E12, 128.01666666666668], [1.60811352E12, 135.98333333333332]], "isOverall": false, "label": "200", "isController": false}], "supportsControllersDiscrimination": false, "granularity": 60000, "maxX": 1.60811364E12, "title": "Codes Per Second"}},
        getOptions: function(){
            return {
                series: {
                    lines: {
                        show: true
                    },
                    points: {
                        show: true
                    }
                },
                xaxis: {
                    mode: "time",
                    timeformat: getTimeFormat(this.data.result.granularity),
                    axisLabel: getElapsedTimeLabel(this.data.result.granularity),
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                },
                yaxis: {
                    axisLabel: "Number of responses / sec",
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                },
                legend: {
                    noColumns: 2,
                    show: true,
                    container: "#legendCodesPerSecond"
                },
                selection: {
                    mode: 'xy'
                },
                grid: {
                    hoverable: true // IMPORTANT! this is needed for tooltip to
                                    // work
                },
                tooltip: true,
                tooltipOpts: {
                    content: "Number of Response Codes %s at %x was %y.2 responses / sec"
                }
            };
        },
    createGraph: function() {
        var data = this.data;
        var dataset = prepareData(data.result.series, $("#choicesCodesPerSecond"));
        var options = this.getOptions();
        prepareOptions(options, data);
        $.plot($("#flotCodesPerSecond"), dataset, options);
        // setup overview
        $.plot($("#overviewCodesPerSecond"), dataset, prepareOverviewOptions(options));
    }
};

// Codes per second
function refreshCodesPerSecond(fixTimestamps) {
    var infos = codesPerSecondInfos;
    prepareSeries(infos.data);
    if(fixTimestamps) {
        fixTimeStamps(infos.data.result.series, 28800000);
    }
    if(isGraph($("#flotCodesPerSecond"))){
        infos.createGraph();
    }else{
        var choiceContainer = $("#choicesCodesPerSecond");
        createLegend(choiceContainer, infos);
        infos.createGraph();
        setGraphZoomable("#flotCodesPerSecond", "#overviewCodesPerSecond");
        $('#footerCodesPerSecond .legendColorBox > div').each(function(i){
            $(this).clone().prependTo(choiceContainer.find("li").eq(i));
        });
    }
};

var transactionsPerSecondInfos = {
        data: {"result": {"minY": 49.06666666666667, "minX": 1.60811346E12, "maxY": 135.98333333333332, "series": [{"data": [[1.60811364E12, 49.06666666666667], [1.60811346E12, 126.86666666666666], [1.60811358E12, 128.01666666666668], [1.60811352E12, 135.98333333333332]], "isOverall": false, "label": "city_brain-success", "isController": false}], "supportsControllersDiscrimination": true, "granularity": 60000, "maxX": 1.60811364E12, "title": "Transactions Per Second"}},
        getOptions: function(){
            return {
                series: {
                    lines: {
                        show: true
                    },
                    points: {
                        show: true
                    }
                },
                xaxis: {
                    mode: "time",
                    timeformat: getTimeFormat(this.data.result.granularity),
                    axisLabel: getElapsedTimeLabel(this.data.result.granularity),
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                },
                yaxis: {
                    axisLabel: "Number of transactions / sec",
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20
                },
                legend: {
                    noColumns: 2,
                    show: true,
                    container: "#legendTransactionsPerSecond"
                },
                selection: {
                    mode: 'xy'
                },
                grid: {
                    hoverable: true // IMPORTANT! this is needed for tooltip to
                                    // work
                },
                tooltip: true,
                tooltipOpts: {
                    content: "%s at %x was %y transactions / sec"
                }
            };
        },
    createGraph: function () {
        var data = this.data;
        var dataset = prepareData(data.result.series, $("#choicesTransactionsPerSecond"));
        var options = this.getOptions();
        prepareOptions(options, data);
        $.plot($("#flotTransactionsPerSecond"), dataset, options);
        // setup overview
        $.plot($("#overviewTransactionsPerSecond"), dataset, prepareOverviewOptions(options));
    }
};

// Transactions per second
function refreshTransactionsPerSecond(fixTimestamps) {
    var infos = transactionsPerSecondInfos;
    prepareSeries(infos.data);
    if(infos.data.result.series.length == 0) {
        setEmptyGraph("#bodyTransactionsPerSecond");
        return;
    }
    if(fixTimestamps) {
        fixTimeStamps(infos.data.result.series, 28800000);
    }
    if(isGraph($("#flotTransactionsPerSecond"))){
        infos.createGraph();
    }else{
        var choiceContainer = $("#choicesTransactionsPerSecond");
        createLegend(choiceContainer, infos);
        infos.createGraph();
        setGraphZoomable("#flotTransactionsPerSecond", "#overviewTransactionsPerSecond");
        $('#footerTransactionsPerSecond .legendColorBox > div').each(function(i){
            $(this).clone().prependTo(choiceContainer.find("li").eq(i));
        });
    }
};

var totalTPSInfos = {
        data: {"result": {"minY": 49.06666666666667, "minX": 1.60811346E12, "maxY": 135.98333333333332, "series": [{"data": [[1.60811364E12, 49.06666666666667], [1.60811346E12, 126.86666666666666], [1.60811358E12, 128.01666666666668], [1.60811352E12, 135.98333333333332]], "isOverall": false, "label": "Transaction-success", "isController": false}, {"data": [], "isOverall": false, "label": "Transaction-failure", "isController": false}], "supportsControllersDiscrimination": true, "granularity": 60000, "maxX": 1.60811364E12, "title": "Total Transactions Per Second"}},
        getOptions: function(){
            return {
                series: {
                    lines: {
                        show: true
                    },
                    points: {
                        show: true
                    }
                },
                xaxis: {
                    mode: "time",
                    timeformat: getTimeFormat(this.data.result.granularity),
                    axisLabel: getElapsedTimeLabel(this.data.result.granularity),
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20,
                },
                yaxis: {
                    axisLabel: "Number of transactions / sec",
                    axisLabelUseCanvas: true,
                    axisLabelFontSizePixels: 12,
                    axisLabelFontFamily: 'Verdana, Arial',
                    axisLabelPadding: 20
                },
                legend: {
                    noColumns: 2,
                    show: true,
                    container: "#legendTotalTPS"
                },
                selection: {
                    mode: 'xy'
                },
                grid: {
                    hoverable: true // IMPORTANT! this is needed for tooltip to
                                    // work
                },
                tooltip: true,
                tooltipOpts: {
                    content: "%s at %x was %y transactions / sec"
                },
                colors: ["#9ACD32", "#FF6347"]
            };
        },
    createGraph: function () {
        var data = this.data;
        var dataset = prepareData(data.result.series, $("#choicesTotalTPS"));
        var options = this.getOptions();
        prepareOptions(options, data);
        $.plot($("#flotTotalTPS"), dataset, options);
        // setup overview
        $.plot($("#overviewTotalTPS"), dataset, prepareOverviewOptions(options));
    }
};

// Total Transactions per second
function refreshTotalTPS(fixTimestamps) {
    var infos = totalTPSInfos;
    // We want to ignore seriesFilter
    prepareSeries(infos.data, false, true);
    if(fixTimestamps) {
        fixTimeStamps(infos.data.result.series, 28800000);
    }
    if(isGraph($("#flotTotalTPS"))){
        infos.createGraph();
    }else{
        var choiceContainer = $("#choicesTotalTPS");
        createLegend(choiceContainer, infos);
        infos.createGraph();
        setGraphZoomable("#flotTotalTPS", "#overviewTotalTPS");
        $('#footerTotalTPS .legendColorBox > div').each(function(i){
            $(this).clone().prependTo(choiceContainer.find("li").eq(i));
        });
    }
};

// Collapse the graph matching the specified DOM element depending the collapsed
// status
function collapse(elem, collapsed){
    if(collapsed){
        $(elem).parent().find(".fa-chevron-up").removeClass("fa-chevron-up").addClass("fa-chevron-down");
    } else {
        $(elem).parent().find(".fa-chevron-down").removeClass("fa-chevron-down").addClass("fa-chevron-up");
        if (elem.id == "bodyBytesThroughputOverTime") {
            if (isGraph($(elem).find('.flot-chart-content')) == false) {
                refreshBytesThroughputOverTime(true);
            }
            document.location.href="#bytesThroughputOverTime";
        } else if (elem.id == "bodyLatenciesOverTime") {
            if (isGraph($(elem).find('.flot-chart-content')) == false) {
                refreshLatenciesOverTime(true);
            }
            document.location.href="#latenciesOverTime";
        } else if (elem.id == "bodyCustomGraph") {
            if (isGraph($(elem).find('.flot-chart-content')) == false) {
                refreshCustomGraph(true);
            }
            document.location.href="#responseCustomGraph";
        } else if (elem.id == "bodyConnectTimeOverTime") {
            if (isGraph($(elem).find('.flot-chart-content')) == false) {
                refreshConnectTimeOverTime(true);
            }
            document.location.href="#connectTimeOverTime";
        } else if (elem.id == "bodyResponseTimePercentilesOverTime") {
            if (isGraph($(elem).find('.flot-chart-content')) == false) {
                refreshResponseTimePercentilesOverTime(true);
            }
            document.location.href="#responseTimePercentilesOverTime";
        } else if (elem.id == "bodyResponseTimeDistribution") {
            if (isGraph($(elem).find('.flot-chart-content')) == false) {
                refreshResponseTimeDistribution();
            }
            document.location.href="#responseTimeDistribution" ;
        } else if (elem.id == "bodySyntheticResponseTimeDistribution") {
            if (isGraph($(elem).find('.flot-chart-content')) == false) {
                refreshSyntheticResponseTimeDistribution();
            }
            document.location.href="#syntheticResponseTimeDistribution" ;
        } else if (elem.id == "bodyActiveThreadsOverTime") {
            if (isGraph($(elem).find('.flot-chart-content')) == false) {
                refreshActiveThreadsOverTime(true);
            }
            document.location.href="#activeThreadsOverTime";
        } else if (elem.id == "bodyTimeVsThreads") {
            if (isGraph($(elem).find('.flot-chart-content')) == false) {
                refreshTimeVsThreads();
            }
            document.location.href="#timeVsThreads" ;
        } else if (elem.id == "bodyCodesPerSecond") {
            if (isGraph($(elem).find('.flot-chart-content')) == false) {
                refreshCodesPerSecond(true);
            }
            document.location.href="#codesPerSecond";
        } else if (elem.id == "bodyTransactionsPerSecond") {
            if (isGraph($(elem).find('.flot-chart-content')) == false) {
                refreshTransactionsPerSecond(true);
            }
            document.location.href="#transactionsPerSecond";
        } else if (elem.id == "bodyTotalTPS") {
            if (isGraph($(elem).find('.flot-chart-content')) == false) {
                refreshTotalTPS(true);
            }
            document.location.href="#totalTPS";
        } else if (elem.id == "bodyResponseTimeVsRequest") {
            if (isGraph($(elem).find('.flot-chart-content')) == false) {
                refreshResponseTimeVsRequest();
            }
            document.location.href="#responseTimeVsRequest";
        } else if (elem.id == "bodyLatenciesVsRequest") {
            if (isGraph($(elem).find('.flot-chart-content')) == false) {
                refreshLatenciesVsRequest();
            }
            document.location.href="#latencyVsRequest";
        }
    }
}

/*
 * Activates or deactivates all series of the specified graph (represented by id parameter)
 * depending on checked argument.
 */
function toggleAll(id, checked){
    var placeholder = document.getElementById(id);

    var cases = $(placeholder).find(':checkbox');
    cases.prop('checked', checked);
    $(cases).parent().children().children().toggleClass("legend-disabled", !checked);

    var choiceContainer;
    if ( id == "choicesBytesThroughputOverTime"){
        choiceContainer = $("#choicesBytesThroughputOverTime");
        refreshBytesThroughputOverTime(false);
    } else if(id == "choicesResponseTimesOverTime"){
        choiceContainer = $("#choicesResponseTimesOverTime");
        refreshResponseTimeOverTime(false);
    }else if(id == "choicesResponseCustomGraph"){
        choiceContainer = $("#choicesResponseCustomGraph");
        refreshCustomGraph(false);
    } else if ( id == "choicesLatenciesOverTime"){
        choiceContainer = $("#choicesLatenciesOverTime");
        refreshLatenciesOverTime(false);
    } else if ( id == "choicesConnectTimeOverTime"){
        choiceContainer = $("#choicesConnectTimeOverTime");
        refreshConnectTimeOverTime(false);
    } else if ( id == "responseTimePercentilesOverTime"){
        choiceContainer = $("#choicesResponseTimePercentilesOverTime");
        refreshResponseTimePercentilesOverTime(false);
    } else if ( id == "choicesResponseTimePercentiles"){
        choiceContainer = $("#choicesResponseTimePercentiles");
        refreshResponseTimePercentiles();
    } else if(id == "choicesActiveThreadsOverTime"){
        choiceContainer = $("#choicesActiveThreadsOverTime");
        refreshActiveThreadsOverTime(false);
    } else if ( id == "choicesTimeVsThreads"){
        choiceContainer = $("#choicesTimeVsThreads");
        refreshTimeVsThreads();
    } else if ( id == "choicesSyntheticResponseTimeDistribution"){
        choiceContainer = $("#choicesSyntheticResponseTimeDistribution");
        refreshSyntheticResponseTimeDistribution();
    } else if ( id == "choicesResponseTimeDistribution"){
        choiceContainer = $("#choicesResponseTimeDistribution");
        refreshResponseTimeDistribution();
    } else if ( id == "choicesHitsPerSecond"){
        choiceContainer = $("#choicesHitsPerSecond");
        refreshHitsPerSecond(false);
    } else if(id == "choicesCodesPerSecond"){
        choiceContainer = $("#choicesCodesPerSecond");
        refreshCodesPerSecond(false);
    } else if ( id == "choicesTransactionsPerSecond"){
        choiceContainer = $("#choicesTransactionsPerSecond");
        refreshTransactionsPerSecond(false);
    } else if ( id == "choicesTotalTPS"){
        choiceContainer = $("#choicesTotalTPS");
        refreshTotalTPS(false);
    } else if ( id == "choicesResponseTimeVsRequest"){
        choiceContainer = $("#choicesResponseTimeVsRequest");
        refreshResponseTimeVsRequest();
    } else if ( id == "choicesLatencyVsRequest"){
        choiceContainer = $("#choicesLatencyVsRequest");
        refreshLatenciesVsRequest();
    }
    var color = checked ? "black" : "#818181";
    choiceContainer.find("label").each(function(){
        this.style.color = color;
    });
}