Skip to content

Instantly share code, notes, and snippets.

View hadaytullah's full-sized avatar

Hadaytullah hadaytullah

View GitHub Profile
@hadaytullah
hadaytullah / statsCollector.js
Last active October 25, 2019 09:59
Statistics collector that calculates the median and average request response times for a 7 days dataset.
/*
* Our application servers receive approximately 20 000
* http requests per second. Response timeout is 19000ms.
* Implement a statistics collector that calculates the
* median and average request response times for a 7 day
* dataset.
*/
'use strict';
$(document).ready(function () {
function sol(today,limit){
let incorrectStyle = 0;
$("tr").each(function (key, val) {
let $tds = $(this).find('td'),
$rowStyle = $(this).css('background-color'),
customerId = $tds.eq(0).text(),
issueDate = new Date($tds.eq(1).text()),
returnDate = $tds.eq(2).text?new Date($tds.eq(2).text()):new Date();