Skip to content

Commit 99a8154

Browse files
authored
Merge pull request #18 from zendive/next
- Fix self-time stats: 1sec leap doesn't continue if no new samples
2 parents b2b839b + c632e98 commit 99a8154

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ To assess Web Application implementation correctness and expedite issues discove
3232
- Warn if it exceeds 4/5 (13.33ms) of 60 FPS hardcoded frame-rate (16.66ms).
3333

3434
- Count calls per second (CPS) when applicable.
35-
- If requested recursively - it reflects animation FPS.
3635

3736
- Detect `eval` function usage in runtime, as well as `setTimeout` and `setInterval` when called with a `string` callback instead of a `function`.
3837
- By default - `off`, cause the fact of wrapping it, excludes the access to local scope variables from the `eval` script, and as a result, may break the application if it does depend on it.

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "1.4.0",
2+
"version": "1.4.1",
33
"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxQCaHgX3DkPnGmHr+rhWyPvYemxMhBbvulmj4RvEpAnGVprdPCUiHSY0jOcDn3vnU6zm8mR1mT3sdlYoUGikBIT19/Jf1iGlc2dySt2bmDQXlTrqllT/XB8HW/wruFej9waMw9yqtW1wOJtElxWnT11pzXkKeflH1Sh+//Jnplr577vOmWh9TU8JLJHS9WklPHJyXCCMGrg/0Sxqte5qWryE2yIm9375KGkKN4ZKjSIxaCg0qodhf5Ug9s2QD7/s5xt548gbEUm9LqQHkNoIH3KXuYOnLksJFxi7FDwhg+oXalsONr5eEvPjkwxYpMKJXfRSg8sB8N6cXLUfgLAKUwIDAQAB",
44
"name": "API Monitor",
55
"manifest_version": 3,

src/api-monitor-cs-main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ let currentMetrics: TTelemetry | null;
1717
const eachSecond = new Timer(
1818
{ type: ETimer.TIMEOUT, timeout: 1e3 },
1919
function apiMonitorEachSecond() {
20-
onEachSecond();
2120
eachSecond.start();
21+
onEachSecond();
2222
},
2323
);
2424
const tick = new Timer({

src/api/time.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,10 +281,10 @@ export class Fps {
281281

282282
constructor(callback?: (value: number) => void) {
283283
this.#eachSecond = new Timer({ type: ETimer.TIMEOUT, timeout: 1e3 }, () => {
284+
this.#eachSecond.start();
284285
this.value = this.#ticks;
285286
this.#ticks = 0;
286287
callback?.(this.value);
287-
this.#eachSecond.start();
288288
});
289289
}
290290

src/view/ConnectionAlert.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
const extensionUpdateSensor = new Timer(
2020
{ type: ETimer.TIMEOUT, timeout: UPDATE_SENSOR_INTERVAL },
2121
() => {
22+
extensionUpdateSensor.start();
2223
whenUpdateDetected(() => {
2324
devtoolsReloadAlertEl?.show();
2425
extensionUpdateSensor.stop();
2526
});
26-
extensionUpdateSensor.start();
2727
},
2828
);
2929

src/view/panels/shared/CellSelfTimeStats.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
const eachSecond = new Timer(
2020
{ type: ETimer.TIMEOUT, timeout: 1e3 },
2121
() => {
22+
eachSecond.start();
23+
2224
if (!mean.samples) {
2325
return;
2426
}
@@ -28,7 +30,6 @@
2830
vs.max = mean.max;
2931
3032
mean.reset();
31-
eachSecond.start();
3233
},
3334
);
3435

0 commit comments

Comments
 (0)