Skip to content

v1.4.0 #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 41 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
81ed4e9
fix extracting a callstack trace link from a row like this `at async …
zendive Jul 5, 2025
f067093
add Worker telemetry
zendive Jul 5, 2025
780aacf
fix wording
zendive Jul 5, 2025
f11ba01
fix order of menu items
zendive Jul 5, 2025
1b0b356
workaround weird -5px document liftup in Chrome v138, caused by `scro…
zendive Jul 9, 2025
31a2df3
add animation after clicking on summary bar selector to bring attenti…
zendive Jul 9, 2025
851c267
deprecate `<ResetHistory/>` button (doesn't fit with Active timers an…
zendive Jul 9, 2025
a27de2b
add <ConnectionAlert /> to alert if script is not yet injected after …
zendive Jul 14, 2025
4ff19b4
href="."
zendive Jul 15, 2025
2be0c27
add Mean class
zendive Jul 17, 2025
5cd58f7
add CellSelfTimeStats
zendive Jul 17, 2025
fa97788
move hardwareConcurrency sensor to content script
zendive Jul 19, 2025
049c21e
include version in zip file-name
zendive Jul 20, 2025
480b803
minimize exceptions
zendive Jul 21, 2025
e51663b
cleanup
zendive Jul 21, 2025
e49a05b
detect extension code update
zendive Jul 21, 2025
c86c82b
Merge branch 'master' into next
zendive Jul 21, 2025
87089f0
mirror: neutralize connection sensors
zendive Jul 22, 2025
f7f6d83
mirror: fix storages reset on version change
zendive Jul 22, 2025
be23820
extract `TTraceable`
zendive Jul 22, 2025
7476b30
worker: add aEL, rEL facts + canceledCounter
zendive Jul 23, 2025
f83d0ea
worker: update description
zendive Jul 23, 2025
8398af8
add `ETraceDomain.SNIPPET`
zendive Jul 24, 2025
2a10b62
add WorkerWrapper_test.ts
zendive Jul 24, 2025
ca55c55
UI: reword wrapped function captions
zendive Jul 24, 2025
7e6695a
update deps + new welcomed surprises from `deno fmt`
zendive Jul 25, 2025
601b2f2
add SchedulerWrapper.ts
zendive Jul 28, 2025
968580e
refactor Timer
zendive Jul 28, 2025
1630fc7
scheduler: add calls per second metrics
zendive Jul 29, 2025
d1344d3
review timed operations in UI
zendive Jul 30, 2025
be970c4
make `apiMonitorTelemetryTick` a low priority task
zendive Jul 30, 2025
30db311
config: make previously invisible by default panels visible
zendive Jul 30, 2025
a8785b6
timer: add ETimer.IDLE + support passing native arguments in the tail…
zendive Jul 31, 2025
7c83d39
simplify ETimer.TASK test cause postTask polyfill is leaking in deno?
zendive Jul 31, 2025
b96546d
mirror: reflect all internal api usages
zendive Aug 2, 2025
91039e9
version: add `What's new` link
zendive Aug 2, 2025
60eaa2f
fix imports order
zendive Aug 2, 2025
851c2c1
timer: use `timeout` option for `ETimer.IDLE` instead of delay
zendive Aug 2, 2025
fb669f7
update promo media
zendive Aug 3, 2025
6d3cb2a
squeeze info into manifest description * typo
zendive Aug 3, 2025
a86a725
timer: normalize `timeout` for any ETimer type
zendive Aug 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 18 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
.PHONY: clean install dev valid test prod serve_mirror
.PHONY: clean install dev valid test test-dev prod mirror-dev mirror-serve
.DEFAULT_GOAL := dev
DENO_DEV = NODE_ENV=development deno run --watch
DENO_PROD = NODE_ENV=production deno run
DENO_OPTIONS = --allow-env --allow-read --allow-run
CHROME_ZIP="extension.chrome.zip"
OUTPUT_DIR = ./public/
BUILD_DIR = ./public/build/
BUILD_SCRIPT = ./build.ts
DENO_DEV := NODE_ENV=development deno run --watch
DENO_PROD := NODE_ENV=production deno run
DENO_OPTIONS := --allow-env --allow-read --allow-run
VERSION != deno eval "\
import m from './manifest.json' with {type:'json'};\
console.log(m.version);\
"
CHROME_ZIP := "extension.chrome-$(VERSION).zip"
OUTPUT_DIR := ./public/
BUILD_DIR := ./public/build/
BUILD_SCRIPT := ./build.ts

clean:
rm -rf ./node_modules $(BUILD_DIR) $(CHROME_ZIP)
Expand Down Expand Up @@ -39,7 +43,12 @@ prod: test

tree -Dis $(BUILD_DIR) *.zip | grep -E "api|zip"

serve_mirror:
mirror-dev:
@echo "🎗 reminder to stop \"make dev\""
rm -rf $(BUILD_DIR)
$(DENO_DEV) $(DENO_OPTIONS) $(BUILD_SCRIPT) --mirror

mirror-serve:
@echo "🎗 reminder to switch extension off"
@echo "served at: http://localhost:5555/mirror.html"
python3 -m http.server 5555 -d ./public/
30 changes: 27 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,21 @@ To assess Web Application implementation correctness and expedite issues discove
- Measure callback's execution self-time.
- Warn if it exceeds 4/5 (13.33ms) of 60 FPS hardcoded frame-rate (16.66ms).

- Count `requestAnimationFrame` calls per second (CPS).
- Count calls per second (CPS) when applicable.
- If requested recursively - it reflects animation FPS.

- Detect `eval` function usage in runtime, as well as `setTimeout` and `setInterval` when called with a `string` callback instead of a `function`. 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 brake the application if it does need it.
- Detect `eval` function usage in runtime, as well as `setTimeout` and `setInterval` when called with a `string` callback instead of a `function`.
- 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.

- Monitor Worker's methods and event handlers metrics.
- Warn if number of active workers exceeds number of available CPU cores.
- keep in mind: extension API can't wrap `self.close()` in worker global context (only `terminate()` in top context)
- Detect anomalies:
- attempt to add already added listener with `addEventListener`.
- attempt to remove unknown listener with `removeEventListener`.

- Monitor `scheduler.yield` and `scheduler.postTask`.
- Calls, delay, priority, aborts, self-time metrics.

- Monitor mounted `video` and `audio` media elements in DOM.
- Present control panel with basic media functions.
Expand All @@ -56,12 +67,25 @@ To assess Web Application implementation correctness and expedite issues discove
- `cancelAnimationFrame`
- `requestIdleCallback`
- `cancelIdleCallback`
- `Worker`
- `constructor`
- `terminate`
- `onmessage`
- `onerror`
- `postMessage`
- `addEventListener`
- `removeEventListener`
- `scheduler`
- `postTask`
- `yield`

</details>
<details>
<summary> <strong>Screenshots</strong> </summary>

![screenshot](./doc/screenshot-01.png)
![screenshot](./doc/screenshot-02.png)
![screenshot](./doc/screenshot-03.png)
![screenshot](./doc/screenshot-04.png)

</details>
Expand All @@ -73,7 +97,7 @@ To assess Web Application implementation correctness and expedite issues discove

- OS: Linux
- Node: 22.14.0 (LTS)
- [Deno](https://docs.deno.com/runtime/getting_started/installation/) 2.3.5
- [Deno](https://docs.deno.com/runtime/getting_started/installation/) 2.4.2

### Build instructions

Expand Down
4 changes: 4 additions & 0 deletions build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import manifest from './manifest.json' with { type: 'json' };

const nodeEnv = Deno.env.get('NODE_ENV');
const isProd = nodeEnv === 'production';
const isMirror = Deno.args.includes('--mirror');
const buildOptions: BuildOptions = {
plugins: [
esbuildSvelte({
Expand All @@ -25,6 +26,9 @@ const buildOptions: BuildOptions = {
__app_name__: `"browser-api-monitor@${manifest.version}"`,
__app_version__: `"${manifest.version}"`,
__home_page__: `"${manifest.homepage_url}"`,
__release_page__:
`"https://github.com/zendive/browser-api-monitor/releases"`,
__mirror__: `${isMirror}`,
},
bundle: true,
platform: 'browser',
Expand Down
12 changes: 6 additions & 6 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@
]
},
"imports": {
"esbuild": "https://deno.land/x/[email protected]/mod.js",
"@luca/esbuild-deno-loader": "jsr:@luca/[email protected]",
"esbuild-svelte": "npm:[email protected]",
"esbuild": "https://deno.land/x/[email protected]/mod.js",
"esbuild-svelte": "npm:[email protected]",
"svelte-preprocess": "npm:[email protected]",

"@std/expect": "jsr:@std/expect@^1.0.15",
"@std/testing": "jsr:@std/testing@^1.0.11",
"happy-dom": "npm:[email protected]"
"@std/expect": "jsr:@std/expect@^1.0.16",
"@std/testing": "jsr:@std/testing@^1.0.15",
"happy-dom": "npm:[email protected]",
"scheduler-polyfill": "npm:[email protected]"
}
}
Loading