mirror of https://github.com/keeweb/keeweb.git
fetching time
This commit is contained in:
parent
7c16a79629
commit
cb150bdba9
|
@ -3,9 +3,6 @@
|
|||
<head lang="en">
|
||||
<meta charset="UTF-8" />
|
||||
<title>KeeWeb</title>
|
||||
<script>
|
||||
window.htmlLoadTime = performance.now();
|
||||
</script>
|
||||
<meta name="application-name" content="KeeWeb" />
|
||||
<meta name="kw-signature" content="" />
|
||||
<meta name="kw-config" content="(no-config)" />
|
||||
|
|
|
@ -2,7 +2,7 @@ import { Logger } from 'util/logger';
|
|||
|
||||
const logger = new Logger('start-profiler');
|
||||
|
||||
let lastTs = window.htmlLoadTime;
|
||||
let lastTs = 0;
|
||||
|
||||
const operations = [];
|
||||
|
||||
|
@ -16,10 +16,7 @@ const StartProfiler = {
|
|||
|
||||
report() {
|
||||
const networkTime = this.getNetworkTime();
|
||||
operations.unshift(
|
||||
{ name: 'fetching', elapsed: networkTime },
|
||||
{ name: 'parsing', elapsed: window.htmlLoadTime - networkTime }
|
||||
);
|
||||
operations.unshift({ name: 'fetching', elapsed: networkTime });
|
||||
|
||||
const time = Math.round(performance.now());
|
||||
const details = operations.map(op => `${op.name}=${Math.round(op.elapsed)}ms`).join(', ');
|
||||
|
|
Loading…
Reference in New Issue