mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2024-11-22 07:10:09 +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
|
* Load Peers from server to configuration page
|
||||||
* @param searchString
|
* @param searchString
|
||||||
*/
|
*/
|
||||||
|
let d1 = new Date();
|
||||||
|
let time = 0;
|
||||||
|
let count = 0;
|
||||||
function loadPeers(searchString){
|
function loadPeers(searchString){
|
||||||
startProgressBar();
|
startProgressBar();
|
||||||
let d1 = new Date();
|
d1 = new Date();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
method: "GET",
|
method: "GET",
|
||||||
url: `/get_config/${conf_name}?search=${encodeURIComponent(searchString)}`,
|
url: `/get_config/${conf_name}?search=${encodeURIComponent(searchString)}`,
|
||||||
@ -357,6 +360,9 @@
|
|||||||
endProgressBar();
|
endProgressBar();
|
||||||
let d2 = new Date();
|
let d2 = new Date();
|
||||||
let seconds = (d2 - d1);
|
let seconds = (d2 - d1);
|
||||||
|
time += seconds;
|
||||||
|
count += 1;
|
||||||
|
console.log(`Average ${time/count}ms`);
|
||||||
$("#peer_loading_time").html(`Peer Loading Time: ${seconds}ms`);
|
$("#peer_loading_time").html(`Peer Loading Time: ${seconds}ms`);
|
||||||
}).fail(function(){
|
}).fail(function(){
|
||||||
noResponding();
|
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