mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2024-11-21 23:01:39 +01:00
Added tracking loading time
This commit is contained in:
parent
fcfd816cec
commit
ed2c3f43c7
@ -338,9 +338,12 @@
|
||||
* Load Peers from server to configuration page
|
||||
* @param searchString
|
||||
*/
|
||||
let d1 = new Date();
|
||||
let time = 0;
|
||||
let count = 0;
|
||||
function loadPeers(searchString){
|
||||
startProgressBar();
|
||||
let d1 = new Date();
|
||||
d1 = new Date();
|
||||
$.ajax({
|
||||
method: "GET",
|
||||
url: `/get_config/${conf_name}?search=${encodeURIComponent(searchString)}`,
|
||||
@ -357,6 +360,9 @@
|
||||
endProgressBar();
|
||||
let d2 = new Date();
|
||||
let seconds = (d2 - d1);
|
||||
time += seconds;
|
||||
count += 1;
|
||||
console.log(`Average ${time/count}ms`);
|
||||
$("#peer_loading_time").html(`Peer Loading Time: ${seconds}ms`);
|
||||
}).fail(function(){
|
||||
noResponding();
|
||||
|
2
src/static/js/configuration.min.js
vendored
2
src/static/js/configuration.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user