Skip to content
This repository was archived by the owner on Sep 17, 2024. It is now read-only.

feat(measurements): collect heap usage#187

Merged
JonasBa merged 12 commits intomainfrom
jb/feat/memory-usage
Aug 29, 2023
Merged

feat(measurements): collect heap usage#187
JonasBa merged 12 commits intomainfrom
jb/feat/memory-usage

Conversation

@JonasBa
Copy link
Copy Markdown
Member

@JonasBa JonasBa commented Aug 15, 2023

Collect heap memory usage at 10hz / every 100ms.

Initializes a single ticking timer which delegates collecting of memory usage stats to each profile.

@JonasBa JonasBa requested a review from indragiek August 15, 2023 14:44
@JonasBa JonasBa force-pushed the jb/feat/memory-usage branch from 62bbd87 to 8f272fe Compare August 15, 2023 14:50
@JonasBa JonasBa changed the title feat(profiling): collect heap usage feat(measurements): collect heap usage Aug 15, 2023
Copy link
Copy Markdown
Member

@indragiek indragiek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewed C++ only

JonasBa and others added 2 commits August 18, 2023 14:38
* ref(heapticker): generalize the ticker

* feat(metrics): collect cpu usage

* ref(review): remove statics

* ref(review): remove statics

* ref(cleanup): rename param

* ref(cleanup): free

* test: handle segfault

* test str

* test str

* test str

* test str

* test removing listeners

* explicit init

* explicit init

* test(measurements): add tests

* fix(ticker): adjust count

* fix(ticker): remove segfault handler

* fix(ticker): remove segfault handler

* fix(cpp): remove compiler warning

* fix(cpp): add remove safety so we dont overflow max measurements
@JonasBa JonasBa merged commit 1c2c350 into main Aug 29, 2023
@JonasBa JonasBa deleted the jb/feat/memory-usage branch August 29, 2023 17:05
// if that title had somehow been stopped already, profile will be null.
if (!profile) {
if (!cpu_profile) {
napi_throw_error(env, "NAPI_ERROR", "StopProfiling: Stopping Sentry profile did not return a profile.");
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing this

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants