Skip to content

Add _beginSection and _endSection JSI bindings for systraces#9101

Merged
tomekzaw merged 2 commits into
mainfrom
@tomekzaw/jsi-systraces
Mar 16, 2026
Merged

Add _beginSection and _endSection JSI bindings for systraces#9101
tomekzaw merged 2 commits into
mainfrom
@tomekzaw/jsi-systraces

Conversation

@tomekzaw

@tomekzaw tomekzaw commented Mar 13, 2026

Copy link
Copy Markdown
Member

Summary

This PR adds _beginSection and _endSection JSI bindings in worklet runtimes (e.g. Reanimated UI runtime) that begin and end systrace sections, respectively, both on Android and iOS.

Usage:

scheduleOnUI(() => {
  globalThis._beginSection('systrace name here');
  // your code here
  globalThis._endSection();
});

Android Profiler:
Screenshot 2026-03-13 at 23 45 37

Xcode instruments:
Screenshot 2026-03-13 at 23 46 51

For profiling the RN runtime you can use Systrace from react-native (docs).

Test plan

@tomekzaw tomekzaw added this pull request to the merge queue Mar 16, 2026
Merged via the queue into main with commit 3d4fe21 Mar 16, 2026
22 checks passed
@tomekzaw tomekzaw deleted the @tomekzaw/jsi-systraces branch March 16, 2026 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants