From 9d1ae6947e72c3735dedc844ba0bd1cec8a0f364 Mon Sep 17 00:00:00 2001 From: Richard Helferty Date: Wed, 16 Aug 2017 12:38:11 -0400 Subject: [PATCH] remove percentages updates --- public/examples/download/downloadApp.js | 6 +----- public/examples/upload/uploadApp.js | 5 +---- public/lib/downloadHttpConcurrentProgress.js | 6 +----- public/lib/uploadHttpConcurrentProgress.js | 6 +----- public/speed-testJS.js | 12 ++---------- 5 files changed, 6 insertions(+), 29 deletions(-) diff --git a/public/examples/download/downloadApp.js b/public/examples/download/downloadApp.js index 7c4cac7..b5dd89f 100644 --- a/public/examples/download/downloadApp.js +++ b/public/examples/download/downloadApp.js @@ -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; @@ -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(); } diff --git a/public/examples/upload/uploadApp.js b/public/examples/upload/uploadApp.js index 7202303..07fe6d5 100644 --- a/public/examples/upload/uploadApp.js +++ b/public/examples/upload/uploadApp.js @@ -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; @@ -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(); } diff --git a/public/lib/downloadHttpConcurrentProgress.js b/public/lib/downloadHttpConcurrentProgress.js index efa74ce..97d6d4a 100644 --- a/public/lib/downloadHttpConcurrentProgress.js +++ b/public/lib/downloadHttpConcurrentProgress.js @@ -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; @@ -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 @@ -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(); diff --git a/public/lib/uploadHttpConcurrentProgress.js b/public/lib/uploadHttpConcurrentProgress.js index f504e32..880b08e 100644 --- a/public/lib/uploadHttpConcurrentProgress.js +++ b/public/lib/uploadHttpConcurrentProgress.js @@ -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; @@ -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 @@ -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(); } diff --git a/public/speed-testJS.js b/public/speed-testJS.js index f533f4c..8d00e0c 100644 --- a/public/speed-testJS.js +++ b/public/speed-testJS.js @@ -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++) { @@ -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(); } @@ -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(); }