Commit 637e8956 authored by Kristupas Bobraitis's avatar Kristupas Bobraitis
Browse files

Add missing stuff for both server versions

parent 02b1a527
tests/performance/result_report
tests/performance/result.jtl
tests/performance/.~lock.log.jtl#
db/__pycache__
server/__pycache__
from http.server import BaseHTTPRequestHandler, HTTPServer
from urllib.parse import urlparse
import configparser
from server.adapter import Db
from db.backend import BalanceTracker
from socketserver import ForkingMixIn
from datetime import datetime
class ForkHTTPServer(ForkingMixIn, HTTPServer):
pass
class DBHandler(BaseHTTPRequestHandler):
def __init__(self, *args, **kwargs):
db, user, password, host, port = self.read_config()
db = Db(db, user, password, host, port)
self.balance_tracker = BalanceTracker(db)
super().__init__(*args, **kwargs)
class BalanceTracker:
def __init__(self, Db):
self.Db = Db
@staticmethod
def read_config():
config = configparser.ConfigParser()
config.read("py_config.ini")
config = config["POSTGRES"]
return config["database"], config["user"], config["password"], config["host"], config["port"]
def insert_space(param):
return param.replace("%20", " ")
def parse_params(self, required_params, param_types):
params = dict(param.split("=")
for param in urlparse(self.path).query.split("&"))
param_names = list(params.keys())
for p, type in zip(required_params, param_types):
if p not in param_names:
raise Exception("Required parameter '%s' not provided" % p)
else:
params[p] = type(params[p])
return params
def find_matching_accounts(self, _partial_account_name):
psql_cmd = """
SELECT json_agg(account_query.accounts
ORDER BY
account_query.name_lengths,
account_query.accounts)
def send_reponse(self, http_code, content_type, response):
self.send_response(http_code)
self.send_header("Content-type", content_type)
self.end_headers()
self.wfile.write(str(response).encode())
FROM (
SELECT
ha.name AS accounts,
LENGTH(ha.name) AS name_lengths
FROM
hive.accounts ha
WHERE
ha.name LIKE '{_partial_account_name}%'
ORDER BY
accounts,
name_lengths
LIMIT 50
) account_query
""".format(_partial_account_name=_partial_account_name)
def serve_favicon(self):
self.send_response(200)
self.send_header('Content-Type', 'image/x-icon')
self.send_header('Content-Length', 0)
self.end_headers()
return self.Db.query(psql_cmd)
def do_GET(self):
if self.path == "/":
response = "Hello World"
self.send_reponse(200, "application/json", response)
def get_balance_for_coin_by_block(self, _account_name, _coin_type, _start_block, _end_block):
__block_increment = int((_end_block - _start_block) / 1000)
elif self.path.startswith("/rpc/") and self.path.split("/")[2] == "find_matching_accounts":
params = self.parse_params(["_partial_account_name"], [str])
response = self.balance_tracker.find_matching_accounts(
params["_partial_account_name"])
self.send_reponse(200, "application/json", response)
psql_cmd = """
SELECT to_jsonb(result) FROM (
SELECT
json_agg(block_step) AS block,
json_agg(CASE WHEN balance IS NULL THEN 0 ELSE balance END) AS balance
FROM (
SELECT
block_step,
first_value(balance) OVER (PARTITION BY value_partition_reverse) AS balance
FROM (
SELECT
block_step,
balance,
SUM(CASE WHEN balance IS NULL THEN 0 ELSE 1 END) OVER (ORDER BY block_step DESC) AS value_partition_reverse
FROM (
SELECT
block_step,
first_value(balance) OVER (PARTITION BY value_partition) AS balance
FROM (
SELECT
steps.block_step AS block_step,
distinct_values.balance AS balance,
SUM(CASE WHEN distinct_values.balance IS NULL THEN 0 ELSE 1 END) OVER (ORDER BY steps.block_step) AS value_partition
FROM (
SELECT DISTINCT ON (block_step)
block_step,
balance
FROM (
SELECT
block_step,
max(balance) OVER (ORDER BY block_step) AS balance
FROM (
SELECT
row_number() OVER (ORDER BY abh.source_op_block) AS id,
((((abh.source_op_block - 1 - {_start_block}) / {__block_increment})::INT + 1) * {__block_increment} + {_start_block})::BIGINT AS block_step,
abh.balance::BIGINT AS balance
FROM
btracker_app.account_balance_history abh
WHERE
abh.account = '{_account_name}' AND
abh.nai = '{_coin_type}' AND
abh.source_op_block >= {_start_block} AND
abh.source_op_block <= {_end_block}
ORDER BY abh.source_op_block ASC
) hive_query
ORDER BY block_step, id DESC
) last_block_values
) distinct_values
RIGHT JOIN (
SELECT
generate_series({_start_block}, {_end_block} + {__block_increment}, {__block_increment}) AS block_step,
null AS balance
) steps
ON distinct_values.block_step = steps.block_step
) join_tables
) fill_balance_bottom
) invert_value_partition
ORDER BY block_step ASC
) fill_balance_top
) result;
""".format(_account_name=_account_name, _coin_type=_coin_type, _start_block=_start_block, _end_block=_end_block, __block_increment=__block_increment)
elif self.path.startswith("/rpc/") and self.path.split("/")[2] == "get_balance_for_coin_by_block":
params = self.parse_params(
["_account_name", "_coin_type", "_start_block", "_end_block"], [str, str, int, int])
response = self.balance_tracker.get_balance_for_coin_by_block(
params["_account_name"], params["_coin_type"], params["_start_block"], params["_end_block"])
self.send_reponse(200, "application/json", response)
return self.Db.query(psql_cmd)
elif self.path.startswith("/rpc/") and self.path.split("/")[2] == "get_balance_for_coin_by_time":
params = self.parse_params(
["_account_name", "_coin_type", "_start_time", "_end_time"], [str, str, str, str])
response = self.balance_tracker.get_balance_for_coin_by_time(
params["_account_name"], params["_coin_type"], params["_start_time"], params["_end_time"])
self.send_reponse(200, "application/json", response)
def get_balance_for_coin_by_time(self, _account_name, _coin_type, _start_time, _end_time):
_start_time = self.insert_space(_start_time)
_end_time = self.insert_space(_end_time)
elif self.path == "/favicon.ico":
self.serve_favicon()
__time_increment = str((datetime.strptime(
_end_time, "%Y-%m-%d %H:%M:%S") - datetime.strptime(_start_time, "%Y-%m-%d %H:%M:%S")) / 1000)
else:
response = "There's nothing here"
self.send_reponse(404, "application/json", response)
\ No newline at end of file
psql_cmd = """
SELECT to_jsonb(result) FROM (
SELECT
json_agg(time_step) AS time,
json_agg(CASE WHEN balance IS NULL THEN 0 ELSE balance END) AS balance
FROM (
SELECT
time_step,
first_value(balance) OVER (PARTITION BY value_partition_reverse) AS balance
FROM (
SELECT
time_step,
balance,
SUM(CASE WHEN balance IS NULL THEN 0 ELSE 1 END) OVER (ORDER BY time_step DESC) AS value_partition_reverse
FROM (
SELECT
time_step,
first_value(balance) OVER (PARTITION BY value_partition) AS balance
FROM (
SELECT
steps.time_step AS time_step,
distinct_values.balance AS balance,
SUM(CASE WHEN distinct_values.balance IS NULL THEN 0 ELSE 1 END) OVER (ORDER BY steps.time_step) AS value_partition
FROM (
SELECT DISTINCT ON (time_step)
time_step,
balance
FROM (
SELECT
time_step,
max(balance) OVER (ORDER BY time_step) AS balance
FROM (
SELECT
row_number() OVER (ORDER BY time_query.created_at) AS id,
(( (SELECT extract( EPOCH FROM ((time_query.created_at - '00:00:01'::TIME - '{_start_time}'::TIMESTAMP)::TIME / (SELECT extract(EPOCH FROM ('{__time_increment}'::INTERVAL)::TIME))) ))::INT + 1 ) * ('{__time_increment}'::INTERVAL)::TIME + '{_start_time}'::TIMESTAMP) AS time_step,
hive_query.balance AS balance
FROM (
SELECT
abh.source_op_block::BIGINT AS block,
abh.balance::BIGINT AS balance
FROM
btracker_app.account_balance_history abh
WHERE
abh.account = '{_account_name}' AND
abh.nai = '{_coin_type}'
ORDER BY abh.source_op_block ASC
) hive_query
LEFT JOIN (
SELECT
num AS block,
created_at::TIMESTAMP
FROM
hive.blocks
) time_query
ON hive_query.block = time_query.block
) add_timestamps
ORDER BY time_step, id DESC
) last_time_values
) distinct_values
RIGHT JOIN (
SELECT
generate_series('{_start_time}'::TIMESTAMP, '{_end_time}'::TIMESTAMP + ('{__time_increment}'::INTERVAL)::TIME, ('{__time_increment}'::INTERVAL)::TIME)::TIMESTAMP AS time_step,
null AS balance
) steps
ON distinct_values.time_step = steps.time_step
) join_tables
) fill_balance_bottom
) invert_value_partition
ORDER BY time_step ASC
) fill_balance_top
) result;
""".format(_account_name=_account_name, _coin_type=_coin_type, _start_time=_start_time, _end_time=_end_time, __time_increment=__time_increment)
return self.Db.query(psql_cmd)
......@@ -60,7 +60,9 @@ GRANT USAGE ON SCHEMA btracker_app to haf_app;
GRANT SELECT ON btracker_app.account_balance_history, hive.blocks TO haf_app;
-- recreate role for connecting to db
DROP OWNED BY admin;
IF (SELECT 1 FROM pg_roles WHERE rolname='admin') IS NOT NULL THEN
DROP OWNED BY admin;
END IF;
DROP ROLE IF EXISTS admin;
CREATE ROLE admin NOINHERIT LOGIN PASSWORD 'admin';
......
......@@ -27,7 +27,7 @@ start_webserver() {
if [ "$1" = "py" ]; then
./main.py ${@:2}
else
postgrest webserver.conf
postgrest postgrest.conf
fi
}
......@@ -36,13 +36,6 @@ install_dependancies() {
install_jmeter
}
install_postgrest() {
wget https://github.com/PostgREST/postgrest/releases/download/v$postgrest_v/postgrest-v$postgrest_v-linux-static-x64.tar.xz
POSTGREST=$(find . -name "postgrest-v${postgrest_v}*")
postgrest webserver.conf
}
install_postgrest() {
wget https://github.com/PostgREST/postgrest/releases/download/v8.0.0/postgrest-v8.0.0-linux-x64-static.tar.xz
......@@ -74,7 +67,7 @@ install_jmeter() {
}
run_tests() {
./tests/run_tests.sh $jmeter_v $1
./tests/run_tests.sh $jmeter_v $2
}
recreate_db() {
......@@ -133,4 +126,6 @@ elif [ "$1" = "start" ]; then
start_webserver
elif [ "$1" = "start-py" ]; then
start_webserver "py" ${@:2}
else
echo "job not found"
fi
from http.server import BaseHTTPRequestHandler
from http.server import BaseHTTPRequestHandler, HTTPServer
from urllib.parse import urlparse
import configparser
from server.adapter import Db
from db.backend import BalanceTracker
from socketserver import ForkingMixIn
class ForkHTTPServer(ForkingMixIn, HTTPServer):
pass
class DBHandler(BaseHTTPRequestHandler):
def __init__(self):
def __init__(self, *args, **kwargs):
db, user, password, host, port = self.read_config()
db = Db(db, user, password, host, port)
self.balance_tracker = BalanceTracker(db)
super().__init__(*args, **kwargs)
@staticmethod
def read_config():
......@@ -18,7 +23,7 @@ class DBHandler(BaseHTTPRequestHandler):
return config["database"], config["user"], config["password"], config["host"], config["port"]
def parse_params(self, required_params, param_types):
params = dict(param.replace("%20", " ").split("=")
params = dict(param.split("=")
for param in urlparse(self.path).query.split("&"))
param_names = list(params.keys())
for p, type in zip(required_params, param_types):
......
This diff is collapsed.
......@@ -136,12 +136,12 @@ $(document).ready(function() {
var data = {"OkPercent": 100.0, "KoPercent": 0.0};
var dataset = [
{
"label" : "KO",
"label" : "FAIL",
"data" : data.KoPercent,
"color" : "#FF6347"
},
{
"label" : "OK",
"label" : "PASS",
"data" : data.OkPercent,
"color" : "#9ACD32"
}];
......@@ -173,7 +173,7 @@ $(document).ready(function() {
});
// Creates APDEX table
createTable($("#apdexTable"), {"supportsControllersDiscrimination": true, "overall": {"data": [0.9199074074074074, 500, 1500, "Total"], "isController": false}, "titles": ["Apdex", "T (Toleration threshold)", "F (Frustration threshold)", "Label"], "items": [{"data": [0.8625, 500, 1500, "get_balance_for_coin_by_block 1"], "isController": false}, {"data": [0.8333333333333334, 500, 1500, "get_balance_for_coin_by_time 2"], "isController": false}, {"data": [0.8166666666666667, 500, 1500, "get_balance_for_coin_by_time 1"], "isController": false}, {"data": [0.8833333333333333, 500, 1500, "get_balance_for_coin_by_block 2"], "isController": false}, {"data": [1.0, 500, 1500, "find_matching_accounts 7"], "isController": false}, {"data": [0.8791666666666667, 500, 1500, "get_balance_for_coin_by_block 5"], "isController": false}, {"data": [1.0, 500, 1500, "find_matching_accounts 6"], "isController": false}, {"data": [0.8333333333333334, 500, 1500, "get_balance_for_coin_by_time 5"], "isController": false}, {"data": [0.8958333333333334, 500, 1500, "get_balance_for_coin_by_block 3"], "isController": false}, {"data": [0.8291666666666667, 500, 1500, "get_balance_for_coin_by_time 4"], "isController": false}, {"data": [1.0, 500, 1500, "find_matching_accounts 8"], "isController": false}, {"data": [0.9041666666666667, 500, 1500, "get_balance_for_coin_by_block 4"], "isController": false}, {"data": [0.8208333333333333, 500, 1500, "get_balance_for_coin_by_time 3"], "isController": false}, {"data": [1.0, 500, 1500, "find_matching_accounts 3"], "isController": false}, {"data": [1.0, 500, 1500, "find_matching_accounts 2"], "isController": false}, {"data": [1.0, 500, 1500, "find_matching_accounts 5"], "isController": false}, {"data": [1.0, 500, 1500, "find_matching_accounts 4"], "isController": false}, {"data": [1.0, 500, 1500, "find_matching_accounts 1"], "isController": false}]}, function(index, item){
createTable($("#apdexTable"), {"supportsControllersDiscrimination": true, "overall": {"data": [0.9939814814814815, 500, 1500, "Total"], "isController": false}, "titles": ["Apdex", "T (Toleration threshold)", "F (Frustration threshold)", "Label"], "items": [{"data": [0.99375, 500, 1500, "get_balance_for_coin_by_block 1"], "isController": false}, {"data": [0.9947916666666666, 500, 1500, "get_balance_for_coin_by_time 2"], "isController": false}, {"data": [0.990625, 500, 1500, "get_balance_for_coin_by_block 2"], "isController": false}, {"data": [0.9895833333333334, 500, 1500, "get_balance_for_coin_by_time 1"], "isController": false}, {"data": [0.9916666666666667, 500, 1500, "get_balance_for_coin_by_block 5"], "isController": false}, {"data": [0.9989583333333333, 500, 1500, "find_matching_accounts 7"], "isController": false}, {"data": [0.9947916666666666, 500, 1500, "find_matching_accounts 6"], "isController": false}, {"data": [0.99375, 500, 1500, "get_balance_for_coin_by_time 5"], "isController": false}, {"data": [0.9927083333333333, 500, 1500, "get_balance_for_coin_by_block 3"], "isController": false}, {"data": [0.9947916666666666, 500, 1500, "get_balance_for_coin_by_time 4"], "isController": false}, {"data": [0.9947916666666666, 500, 1500, "get_balance_for_coin_by_block 4"], "isController": false}, {"data": [0.996875, 500, 1500, "find_matching_accounts 8"], "isController": false}, {"data": [0.9979166666666667, 500, 1500, "get_balance_for_coin_by_time 3"], "isController": false}, {"data": [0.9916666666666667, 500, 1500, "find_matching_accounts 3"], "isController": false}, {"data": [0.99375, 500, 1500, "find_matching_accounts 2"], "isController": false}, {"data": [0.9927083333333333, 500, 1500, "find_matching_accounts 5"], "isController": false}, {"data": [0.9947916666666666, 500, 1500, "find_matching_accounts 4"], "isController": false}, {"data": [0.99375, 500, 1500, "find_matching_accounts 1"], "isController": false}]}, function(index, item){
switch(index){
case 0:
item = item.toFixed(3);
......@@ -187,7 +187,7 @@ $(document).ready(function() {
}, [[0, 0]], 3);
// Create statistics table
createTable($("#statisticsTable"), {"supportsControllersDiscrimination": true, "overall": {"data": ["Total", 2160, 0, 0.0, 257.40231481481493, 8, 1033, 268.0, 702.0, 766.0, 874.0, 31.090767769237413, 608.503271007859, 8.973680801450902], "isController": false}, "titles": ["Label", "#Samples", "KO", "Error %", "Average", "Min", "Max", "Median", "90th pct", "95th pct", "99th pct", "Transactions\/s", "Received", "Sent"], "items": [{"data": ["get_balance_for_coin_by_block 1", 120, 0, 0.0, 482.7499999999999, 221, 1033, 346.0, 862.8, 890.0, 1019.5599999999995, 1.7486338797814207, 31.308060109289617, 0.5259562841530054], "isController": false}, {"data": ["get_balance_for_coin_by_time 2", 120, 0, 0.0, 440.475, 214, 781, 333.5, 721.0, 740.8499999999999, 780.79, 1.7921682248573731, 77.34325995400101, 0.6020565130380239], "isController": false}, {"data": ["get_balance_for_coin_by_time 1", 120, 0, 0.0, 443.6083333333334, 202, 822, 354.5, 713.8, 725.8499999999999, 807.0899999999995, 1.7865916298182143, 68.36155589798561, 0.6001831256420563], "isController": false}, {"data": ["get_balance_for_coin_by_block 2", 120, 0, 0.0, 448.9083333333334, 225, 903, 338.5, 843.8, 855.95, 902.79, 1.7527971721538957, 39.893252826385435, 0.5272085244369139], "isController": false}, {"data": ["find_matching_accounts 7", 120, 0, 0.0, 28.20833333333333, 8, 126, 24.0, 48.900000000000006, 57.89999999999998, 123.68999999999991, 15.879317189360858, 7.040244144501786, 4.031857880111155], "isController": false}, {"data": ["get_balance_for_coin_by_block 5", 120, 0, 0.0, 415.3416666666666, 199, 820, 309.5, 760.6, 776.9, 816.0099999999999, 1.7627875547198637, 31.681974762758177, 0.5405422775215207], "isController": false}, {"data": ["find_matching_accounts 6", 120, 0, 0.0, 29.049999999999994, 10, 108, 25.5, 49.900000000000006, 58.89999999999998, 102.32999999999979, 15.854141894569954, 8.205757035275466, 3.994500594530321], "isController": false}, {"data": ["get_balance_for_coin_by_time 5", 120, 0, 0.0, 429.12499999999994, 200, 791, 330.5, 700.9, 716.8499999999999, 780.2899999999996, 1.8149094813896156, 69.24659515419168, 0.6096961539043241], "isController": false}, {"data": ["get_balance_for_coin_by_block 3", 120, 0, 0.0, 442.14166666666677, 225, 975, 338.5, 832.6, 871.0, 958.8299999999994, 1.7561061273469627, 31.753965873004258, 0.5282037961160786], "isController": false}, {"data": ["get_balance_for_coin_by_time 4", 120, 0, 0.0, 431.0583333333333, 214, 832, 306.5, 701.0, 724.4499999999998, 831.79, 1.8083182640144664, 68.39469371609404, 0.6074819168173599], "isController": false}, {"data": ["find_matching_accounts 8", 120, 0, 0.0, 27.866666666666678, 11, 69, 24.0, 51.0, 53.0, 67.94999999999996, 15.904572564612325, 7.051441351888668, 4.053802186878728], "isController": false}, {"data": ["get_balance_for_coin_by_block 4", 120, 0, 0.0, 405.4666666666668, 197, 934, 308.5, 794.2, 808.8, 923.4999999999995, 1.7599178704993768, 30.53216891545061, 0.5293502969861407], "isController": false}, {"data": ["get_balance_for_coin_by_time 3", 120, 0, 0.0, 441.79166666666663, 236, 828, 335.5, 708.9, 732.4499999999998, 816.6599999999996, 1.7979413571460676, 70.55515185113046, 0.6039959246662572], "isController": false}, {"data": ["find_matching_accounts 3", 120, 0, 0.0, 32.666666666666664, 10, 98, 28.5, 54.0, 64.94999999999999, 94.21999999999986, 15.919342000530644, 107.14463385513399, 3.9642892677102677], "isController": false}, {"data": ["find_matching_accounts 2", 120, 0, 0.0, 34.25833333333333, 11, 91, 30.0, 53.900000000000006, 61.849999999999966, 90.36999999999998, 15.942606616181745, 358.5218214428059, 3.954513750498206], "isController": false}, {"data": ["find_matching_accounts 5", 120, 0, 0.0, 27.54166666666666, 9, 68, 25.0, 44.900000000000006, 50.0, 68.0, 15.818613234906406, 8.434534010018455, 3.970101173213815], "isController": false}, {"data": ["find_matching_accounts 4", 120, 0, 0.0, 29.0, 11, 110, 24.5, 51.900000000000006, 62.94999999999999, 102.64999999999972, 15.818613234906406, 12.574561692591615, 3.9546533087266016], "isController": false}, {"data": ["find_matching_accounts 1", 120, 0, 0.0, 43.983333333333334, 19, 100, 40.0, 63.0, 70.0, 94.7499999999998, 15.898251192368837, 471.1564735691574, 3.927985890302067], "isController": false}]}, function(index, item){
createTable($("#statisticsTable"), {"supportsControllersDiscrimination": true, "overall": {"data": ["Total", 8640, 0, 0.0, 82.23599537037019, 17, 3260, 51.0, 139.0, 183.0, 1046.0, 182.91133880938267, 37826.11845308663, 37.769127360487765], "isController": false}, "titles": ["Label", "#Samples", "FAIL", "Error %", "Average", "Min", "Max", "Median", "90th pct", "95th pct", "99th pct", "Transactions/s", "Received", "Sent"], "items": [{"data": ["get_balance_for_coin_by_block 1", 480, 0, 0.0, 61.52500000000005, 22, 1120, 43.0, 78.0, 89.94999999999999, 1038.23, 20.66115702479339, 402.3477853822314, 4.559981921487603], "isController": false}, {"data": ["get_balance_for_coin_by_time 2", 480, 0, 0.0, 151.29166666666654, 91, 1297, 128.5, 209.90000000000003, 251.74999999999994, 1168.32, 10.25224801896666, 8180.92347658002, 2.5630620047416643], "isController": false}, {"data": ["get_balance_for_coin_by_block 2", 480, 0, 0.0, 67.39583333333336, 21, 1372, 44.0, 78.0, 87.0, 1061.42, 20.674505750096912, 503.65841840031015, 4.5629280268768575], "isController": false}, {"data": ["get_balance_for_coin_by_time 1", 480, 0, 0.0, 158.00000000000003, 85, 3260, 124.0, 210.0, 241.0, 1236.28, 10.243059260365763, 7195.459043767739, 2.560764815091441], "isController": false}, {"data": ["get_balance_for_coin_by_block 5", 480, 0, 0.0, 61.14166666666668, 20, 1072, 39.0, 72.90000000000003, 88.89999999999998, 1050.52, 20.62298603651987, 265.31954887218046, 4.692534908700322], "isController": false}, {"data": ["find_matching_accounts 7", 480, 0, 0.0, 42.193749999999994, 17, 1039, 34.0, 65.90000000000003, 76.94999999999999, 108.57, 18.524950793099457, 6.6212226467523445, 3.1839759175639686], "isController": false}, {"data": ["find_matching_accounts 6", 480, 0, 0.0, 49.99374999999999, 17, 1108, 33.0, 66.0, 74.94999999999999, 1052.9, 18.521376755672172, 7.5785711529557025, 3.1652743478931935], "isController": false}, {"data": ["get_balance_for_coin_by_time 5", 480, 0, 0.0, 144.5666666666664, 87, 1247, 121.0, 197.90000000000003, 228.95, 1216.52, 10.28784533939173, 7254.427926141844, 2.571961334847933], "isController": false}, {"data": ["get_balance_for_coin_by_block 3", 480, 0, 0.0, 80.48958333333336, 31, 3071, 57.5, 96.0, 112.94999999999999, 1055.6599999999999, 20.622100017185083, 420.3766755456264, 4.551361917855302], "isController": false}, {"data": ["get_balance_for_coin_by_time 4", 480, 0, 0.0, 141.63333333333335, 84, 1329, 120.0, 199.0, 226.0, 1150.47, 10.276172125883107, 7138.908959537572, 2.5690430314707773], "isController": false}, {"data": ["get_balance_for_coin_by_block 4", 480, 0, 0.0, 59.62291666666664, 21, 1284, 43.0, 80.0, 91.0, 1041.1399999999999, 20.62919030428056, 396.8500193398659, 4.552926766374419], "isController": false}, {"data": ["find_matching_accounts 8", 480, 0, 0.0, 45.85416666666665, 17, 1067, 33.5, 67.0, 75.94999999999999, 112.51999999999998, 18.529241459177765, 6.387521713954834, 3.220903300521135], "isController": false}, {"data": ["get_balance_for_coin_by_time 3", 480, 0, 0.0, 148.22083333333302, 92, 1214, 133.0, 212.0, 256.9, 330.76, 10.262989095574085, 7405.498316228351, 2.565747273893521], "isController": false}, {"data": ["find_matching_accounts 3", 480, 0, 0.0, 56.31875, 18, 1335, 33.0, 66.0, 78.0, 1060.9, 18.504240555127218, 12.685524286815728, 3.1081341557440245], "isController": false}, {"data": ["find_matching_accounts 2", 480, 0, 0.0, 53.270833333333314, 17, 1294, 34.5, 66.0, 73.0, 1071.19, 18.50923533721513, 12.99623067134539, 3.090897697913855], "isController": false}, {"data": ["find_matching_accounts 5", 480, 0, 0.0, 54.170833333333356, 18, 1261, 33.0, 66.0, 79.94999999999999, 1044.33, 18.517804097064158, 7.83028239651248, 3.1465799930558234], "isController": false}, {"data": ["find_matching_accounts 4", 480, 0, 0.0, 49.210416666666625, 18, 1093, 32.0, 64.0, 72.0, 1037.61, 18.507807981492192, 11.983082706766918, 3.126807403123193], "isController": false}, {"data": ["find_matching_accounts 1", 480, 0, 0.0, 55.34791666666667, 18, 1098, 37.0, 71.0, 84.94999999999999, 1067.1399999999999, 18.49425907374586, 12.10073591739231, 3.0703359790398395], "isController": false}]}, function(index, item){
switch(index){
// Errors pct
case 3:
......@@ -228,7 +228,7 @@ $(document).ready(function() {
}, [[1, 1]]);
// Create top5 errors by sampler
createTable($("#top5ErrorsBySamplerTable"), {"supportsControllersDiscrimination": false, "overall": {"data": ["Total", 2160, 0, null, null, null, null, null, null, null, null, null, null], "isController": false}, "titles": ["Sample", "#Samples", "#Errors", "Error", "#Errors", "Error", "#Errors", "Error", "#Errors", "Error", "#Errors", "Error", "#Errors"], "items": [{"data": [], "isController": false}, {"data": [], "isController": false}, {"data": [], "isController": false}, {"data": [], "isController": false}, {"data": [], "isController": false}, {"data": [], "isController": false}, {"data": [], "isController": false}, {"data": [], "isController": false}, {"data": [], "isController": false}, {"data": [], "isController": false}, {"data": [], "isController": false}, {"data": [], "isController": false}, {"data": [], "isController": false}, {"data": [], "isController": false}, {"data": [], "isController": false}, {"data": [], "isController": false}, {"data": [], "isController": false}, {"data": [], "isController": false}]}, function(index, item){
createTable($("#top5ErrorsBySamplerTable"), {"supportsControllersDiscrimination": false, "overall": {"data": ["Total", 8640, 0, null, null, null, null, null, null, null, null, null, null], "isController": false}, "titles": ["Sample", "#Samples", "#Errors", "Error", "#Errors", "Error", "#Errors", "Error", "#Errors", "Error", "#Errors", "Error", "#Errors"], "items": [{"data": [], "isController": false}, {"data": [], "isController": false}, {"data": [], "isController": false}, {"data": [], "isController": false}, {"data": [], "isController": false}, {"data": [], "isController": false}, {"data": [], "isController": false}, {"data": [], "isController": false}, {"data": [], "isController": false}, {"data": [], "isController": false}, {"data": [], "isController": false}, {"data": [], "isController": false}, {"data": [], "isController": false}, {"data": [], "isController": false}, {"data": [], "isController": false}, {"data": [], "isController": false}, {"data": [], "isController": false}, {"data": [], "isController": false}]}, function(index, item){
return item;
}, [[0, 0]], 0);
......
......@@ -112,11 +112,11 @@
</tr>
<tr>
<td>Start Time:</td>
<td>"12/27/21 2:24 PM"</td>
<td>"3/3/22 11:48 AM"</td>
</tr>
<tr>
<td>End Time:</td>
<td>"12/27/21 2:25 PM"</td>
<td>"3/3/22 11:48 AM"</td>
</tr>
<tr>
<td>Filter for display:</td>
......
......@@ -160,11 +160,11 @@
</tr>
<tr>
<td>Start Time:</td>
<td>"12/27/21 2:24 PM"</td>
<td>"3/3/22 11:48 AM"</td>
</tr>
<tr>
<td>End Time:</td>
<td>"12/27/21 2:25 PM"</td>
<td>"3/3/22 11:48 AM"</td>
</tr>
<tr>
<td>Filter for display:</td>
......
......@@ -129,11 +129,11 @@
</tr>
<tr>
<td>Start Time:</td>
<td>"12/27/21 2:24 PM"</td>
<td>"3/3/22 11:48 AM"</td>
</tr>
<tr>
<td>End Time:</td>
<td>"12/27/21 2:25 PM"</td>
<td>"3/3/22 11:48 AM"</td>
</tr>
<tr>
<td>Filter for display:</td>
......
......@@ -129,11 +129,11 @@
</tr>
<tr>
<td>Start Time:</td>
<td>"12/27/21 2:24 PM"</td>
<td>"3/3/22 11:48 AM"</td>
</tr>
<tr>
<td>End Time:</td>
<td>"12/27/21 2:25 PM"</td>
<td>"3/3/22 11:48 AM"</td>
</tr>
<tr>
<td>Filter for display:</td>
......
......@@ -94,11 +94,11 @@
</tr>
<tr>
<td>Start Time</td>
<td>"12/27/21 2:24 PM"</td>
<td>"3/3/22 11:48 AM"</td>
</tr>
<tr>
<td>End Time</td>
<td>"12/27/21 2:25 PM"</td>
<td>"3/3/22 11:48 AM"</td>
</tr>
<tr>
<td>Filter for display</td>
......
{
"get_balance_for_coin_by_block 1" : {
"transaction" : "get_balance_for_coin_by_block 1",
"sampleCount" : 120,
"sampleCount" : 480,
"errorCount" : 0,
"errorPct" : 0.0,
"meanResTime" : 482.7499999999999,
"medianResTime" : 346.0,
"minResTime" : 221.0,
"maxResTime" : 1033.0,
"pct1ResTime" : 862.8,
"pct2ResTime" : 890.0,
"pct3ResTime" : 1019.5599999999995,
"throughput" : 1.7486338797814207,
"receivedKBytesPerSec" : 31.308060109289617,
"sentKBytesPerSec" : 0.5259562841530054
"meanResTime" : 61.52500000000005,
"medianResTime" : 43.0,
"minResTime" : 22.0,
"maxResTime" : 1120.0,
"pct1ResTime" : 78.0,
"pct2ResTime" : 89.94999999999999,
"pct3ResTime" : 1038.23,
"throughput" : 20.66115702479339,
"receivedKBytesPerSec" : 402.3477853822314,
"sentKBytesPerSec" : 4.559981921487603
},
"get_balance_for_coin_by_time 2" : {
"transaction" : "get_balance_for_coin_by_time 2",
"sampleCount" : 120,
"sampleCount" : 480,
"errorCount" : 0,
"errorPct" : 0.0,