Skip to content

Commit

Permalink
remove percentages updates
Browse files Browse the repository at this point in the history
  • Loading branch information
rotosonic committed Aug 16, 2017
1 parent 36891b5 commit 9d1ae69
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 29 deletions.
6 changes: 1 addition & 5 deletions public/examples/download/downloadApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,10 +307,6 @@
myChart.setOption(option, true);
}

function downloadHttpOnPercentageComplete(result) {
console.log(result);
}

urls.length = 0;

var baseUrl = (version === 'IPv6') ? testPlan.baseUrlIPv6NoPort : testPlan.baseUrlIPv4NoPort;
Expand All @@ -323,7 +319,7 @@
}

var downloadHttpConcurrentProgress = new window.downloadHttpConcurrentProgress(urls, 'GET', downloadCurrentRuns, downloadTestTimeout, downloadTestLength, downloadMovingAverage, downloadHttpOnComplete, downloadHttpOnProgress,
downloadHttpOnAbort, downloadHttpOnTimeout, downloadHttpOnError, downloadSize, downloadProgressInterval, monitorInterval, downloadHttpOnPercentageComplete);
downloadHttpOnAbort, downloadHttpOnTimeout, downloadHttpOnError, downloadSize, downloadProgressInterval, monitorInterval);

downloadHttpConcurrentProgress.initiateTest();
}
Expand Down
5 changes: 1 addition & 4 deletions public/examples/upload/uploadApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,6 @@
//update gauge
myChart.setOption(option, true);
}
function uploadHttpOnPercentageComplete(result) {
console.log(result);
}

var uploadHttpConcurrentProgress;
var baseUrl = (version === 'IPv6') ? testPlan.baseUrlIPv6NoPort : testPlan.baseUrlIPv4NoPort;
Expand All @@ -286,7 +283,7 @@
}

uploadHttpConcurrentProgress = new window.uploadHttpConcurrentProgress(urls, 'POST', uploadCurrentRuns, uploadTestTimeout, uploadTestLength, uploadMovingAverage, uploadHttpOnComplete, uploadHttpOnProgress,
uploadHttpOnError, uploadSize, testPlan.maxuploadSize, monitorInterval, isMicrosoftBrowser, uploadHttpOnPercentageComplete);
uploadHttpOnError, uploadSize, testPlan.maxuploadSize, monitorInterval, isMicrosoftBrowser);

uploadHttpConcurrentProgress.initiateTest();
}
Expand Down
6 changes: 1 addition & 5 deletions public/lib/downloadHttpConcurrentProgress.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,9 @@
* @param function callback function for test suite abort event
* @param function callback function for test suite timeout event
* @param function callback function for test suite error event
* @param function callback function for test percentage complete
**/
function downloadHttpConcurrentProgress(urls, type, concurrentRuns, timeout, testLength, movingAverage, callbackComplete, callbackProgress, callbackAbort,
callbackTimeout, callbackError, size, progressIntervalDownload, monitorInterval, callbackPercentageComplete) {
callbackTimeout, callbackError, size, progressIntervalDownload, monitorInterval) {
this.urls = urls;
this.size = size;
this.type = type;
Expand All @@ -55,7 +54,6 @@
this.clientCallbackAbort = callbackAbort;
this.clientCallbackTimeout = callbackTimeout;
this.clientCallbackError = callbackError;
this.clientCallbackPercentageComplete = callbackPercentageComplete;
//start time of test suite
this._beginTime = Date.now();
//boolean on whether test suite is running or not
Expand Down Expand Up @@ -229,8 +227,6 @@
}

}
var percentComplete = Math.round(((Date.now() - this._beginTime)/this.testLength)*100);
this.clientCallbackPercentageComplete(percentComplete);
//check for end of test
if ((Date.now() - this._beginTime) > this.testLength) {
this.endTest();
Expand Down
6 changes: 1 addition & 5 deletions public/lib/uploadHttpConcurrentProgress.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,9 @@
* @param size - initial size to start upload testing.
* @param maxuploadSize - upload size should not exceed max upload size.
* @param monitorInterval - monitor interval.
* @param function callback function for test percentage complete
*/
function uploadHttpConcurrentProgress(urls, type, concurrentRuns, timeout, testLength, movingAverage, callbackComplete, callbackProgress, callbackError, size, maxuploadSize,
monitorInterval, isMicrosoftBrowser, callbackPercentageComplete) {
monitorInterval, isMicrosoftBrowser) {
this.urls = urls;
this.size = size;
this.type = type;
Expand All @@ -54,7 +53,6 @@
this.clientCallbackComplete = callbackComplete;
this.clientCallbackProgress = callbackProgress;
this.clientCallbackError = callbackError;
this.clientCallbackPercentageComplete = callbackPercentageComplete;
//start time of test suite
this._beginTime = Date.now();
//boolean on whether test suite is running or not
Expand Down Expand Up @@ -303,8 +301,6 @@
uploadHttpConcurrentProgress.prototype._monitor = function () {
this._calculateResults();
//check for end of test
var percentComplete = Math.round(((Date.now() - this._beginTime)/this.testLength)*100);
this.clientCallbackPercentageComplete(percentComplete);
if ((Date.now() - this._beginTime) > this.testLength) {
this.endTest();
}
Expand Down
12 changes: 2 additions & 10 deletions public/speed-testJS.js
Original file line number Diff line number Diff line change
Expand Up @@ -450,10 +450,6 @@
myChart.setOption(option, true);
}

function downloadHttpOnPercentageComplete(result) {
console.log(result);
}

downloadUrls.length=0;
var baseUrl = (version === 'IPv6') ? testPlan.baseUrlIPv6NoPort : testPlan.baseUrlIPv4NoPort;
for (var i = 0; i < ports.length; i++) {
Expand All @@ -464,7 +460,7 @@
}
}
var downloadHttpConcurrentProgress = new window.downloadHttpConcurrentProgress(downloadUrls, 'GET', downloadCurrentRuns, downloadTestTimeout, downloadTestLength, downloadMovingAverage, downloadHttpOnComplete, downloadHttpOnProgress,
downloadHttpOnAbort, downloadHttpOnTimeout, downloadHttpOnError,downloadSize, downloadProgressInterval,downloadMonitorInterval, downloadHttpOnPercentageComplete);
downloadHttpOnAbort, downloadHttpOnTimeout, downloadHttpOnError,downloadSize, downloadProgressInterval,downloadMonitorInterval);

downloadHttpConcurrentProgress.initiateTest();
}
Expand Down Expand Up @@ -537,12 +533,8 @@
}
}

function uploadHttpOnPercentageComplete(result) {
console.log(result);
}

var uploadHttpConcurrentProgress = new window.uploadHttpConcurrentProgress(uploadUrls, 'POST', uploadCurrentRuns, uploadTestTimeout, uploadTestLength, uploadMovingAverage, uploadHttpOnComplete, uploadHttpOnProgress,
uploadHttpOnError, uploadSize, testPlan.maxuploadSize, uploadMonitorInterval, isMicrosoftBrowser, uploadHttpOnPercentageComplete);
uploadHttpOnError, uploadSize, testPlan.maxuploadSize, uploadMonitorInterval, isMicrosoftBrowser);

uploadHttpConcurrentProgress.initiateTest();
}
Expand Down

0 comments on commit 9d1ae69

Please sign in to comment.