@rn-perf-kit/native 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -0
- package/package.json +23 -3
package/README.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# @rn-perf-kit/native
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@rn-perf-kit/native)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
|
|
6
|
+
> Native TurboModule bridge for **rn-perf-kit**: frame timing, memory sampling, thermal state, and device tier classification.
|
|
7
|
+
|
|
8
|
+
Part of the [rn-perf-kit](https://github.com/arpitkumarsahu/rn-perf-kit) monorepo.
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
```sh
|
|
13
|
+
npm install @rn-perf-kit/native
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
### Expo Config Plugin
|
|
17
|
+
In `app.json`:
|
|
18
|
+
```json
|
|
19
|
+
{
|
|
20
|
+
"expo": {
|
|
21
|
+
"plugins": ["@rn-perf-kit/native"]
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Platform Architecture
|
|
27
|
+
|
|
28
|
+
- **Android**: Implements AndroidX `JankStats` and `Window.OnFrameMetricsAvailableListener` on API 24+ for frame-by-frame breakdown (UI duration, layout, draw, vsync delay).
|
|
29
|
+
- **iOS**: Uses `CADisplayLink` timestamp tracking, `mach_task_basic_info` memory stats, and `NSProcessInfo.thermalState`.
|
|
30
|
+
- **Hardware Tiering**: Automatically classifies device into `LOW`, `MID`, or `HIGH` based on RAM and CPU core count.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rn-perf-kit/native",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Native TurboModule for rn-perf-kit: frames, memory, thermal, device tier",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -16,6 +16,26 @@
|
|
|
16
16
|
"@types/react-native": "^0.73.0"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@rn-perf-kit/core": "^0.1.
|
|
20
|
-
}
|
|
19
|
+
"@rn-perf-kit/core": "^0.1.1"
|
|
20
|
+
},
|
|
21
|
+
"author": "Arpit Kumar Sahu <aarpitkumarsahu99@gmail.com>",
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "git+https://github.com/arpitkumarsahu/rn-perf-kit.git",
|
|
26
|
+
"directory": "packages/native"
|
|
27
|
+
},
|
|
28
|
+
"bugs": {
|
|
29
|
+
"url": "https://github.com/arpitkumarsahu/rn-perf-kit/issues"
|
|
30
|
+
},
|
|
31
|
+
"homepage": "https://github.com/arpitkumarsahu/rn-perf-kit#readme",
|
|
32
|
+
"keywords": [
|
|
33
|
+
"react-native",
|
|
34
|
+
"turbomodule",
|
|
35
|
+
"framemetrics",
|
|
36
|
+
"jankstats",
|
|
37
|
+
"cadisplaylink",
|
|
38
|
+
"android",
|
|
39
|
+
"ios"
|
|
40
|
+
]
|
|
21
41
|
}
|