Skip to content

Commit

Permalink
feat(backend): ingest cpu and memory performance metrics
Browse files Browse the repository at this point in the history
add the following events:
1. cpu_usage
2. memory_usage
3. low_memory
4. trim_memory
  • Loading branch information
abhaysood committed Dec 9, 2023
1 parent 4d27978 commit 0b14672
Show file tree
Hide file tree
Showing 8 changed files with 356 additions and 5 deletions.
29 changes: 28 additions & 1 deletion measure-android/session-samples/unobfuscated/all_events.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@
"message": "shell-induced crash",
"type": "android.app.RemoteServiceException$CrashedByAdbException"
}

],
"handled": false,
"thread_name": "main",
Expand Down Expand Up @@ -686,6 +685,34 @@
"timestamp": "2023-10-14T00:59:05.407000000Z",
"type": "network_change",
"thread_name": "Connectivity Thread"
},
{
"memory_usage": {
"java_max_heap": 262144,
"java_total_heap": 151331,
"java_free_heap": 62762,
"total_pss": 342870,
"rss": 447748,
"native_total_heap": 109664,
"native_free_heap": 42273,
"interval_config": 2000
},
"timestamp": "2023-10-24T15:25:15.813000000Z",
"type": "memory_usage",
"thread_name": "main"
},
{
"timestamp": "2023-10-24T15:25:15.813000000Z",
"type": "low_memory",
"thread_name": "main"
},
{
"trim_memory": {
"level": "TRIM_MEMORY_RUNNING_LOW"
},
"timestamp": "2023-10-24T15:25:15.813000000Z",
"type": "trim_memory",
"thread_name": "main"
}
],
"resource": {
Expand Down
45 changes: 45 additions & 0 deletions measure-android/session-samples/unobfuscated/cpu_usage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"events": [
{
"cpu_usage": {
"num_cores": 1,
"clock_speed": 100,
"start_time": 829351,
"uptime": 8306448,
"utime": 54,
"cutime": 0,
"cstime": 0,
"stime": 46,
"interval_config": 3000
},
"timestamp": "2023-10-24T15:25:15.813000000Z",
"type": "cpu_usage",
"thread_name": "main"
}
],
"resource": {
"app_build": "50453",
"app_unique_id": "org.wikipedia.dev",
"app_version": "2.7.50453-dev-2023-10-14",
"device_density": 2.75,
"device_density_dpi": 440,
"device_height_px": 2154,
"device_is_foldable": true,
"device_is_physical": false,
"device_manufacturer": "Google",
"device_model": "sdk_gphone64_arm64",
"device_name": "emu64a",
"device_type": "phone",
"device_width_px": 1080,
"device_locale": "en-US",
"measure_sdk_version": "0.0.1-SNAPSHOT",
"os_name": "android",
"os_version": "33",
"platform": "android",
"network_type": "wifi",
"network_generation": "2g",
"network_provider": "T-Mobile"
},
"session_id": "f1fd8bb0-e336-412a-9ff5-43d8f355c542",
"timestamp": "2023-10-14T00:55:26.660000000Z"
}
34 changes: 34 additions & 0 deletions measure-android/session-samples/unobfuscated/low_memory.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"events": [
{
"timestamp": "2023-10-24T15:25:15.813000000Z",
"type": "low_memory",
"thread_name": "main"
}
],
"resource": {
"app_build": "50453",
"app_unique_id": "org.wikipedia.dev",
"app_version": "2.7.50453-dev-2023-10-14",
"device_density": 2.75,
"device_density_dpi": 440,
"device_height_px": 2154,
"device_is_foldable": true,
"device_is_physical": false,
"device_manufacturer": "Google",
"device_model": "sdk_gphone64_arm64",
"device_name": "emu64a",
"device_type": "phone",
"device_width_px": 1080,
"device_locale": "en-US",
"measure_sdk_version": "0.0.1-SNAPSHOT",
"os_name": "android",
"os_version": "33",
"platform": "android",
"network_type": "wifi",
"network_generation": "2g",
"network_provider": "T-Mobile"
},
"session_id": "f1ad7bb0-e226-410f-9ff5-43d8f355c542",
"timestamp": "2023-10-14T00:55:26.660000000Z"
}
44 changes: 44 additions & 0 deletions measure-android/session-samples/unobfuscated/memory_usage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"events": [
{
"memory_usage": {
"java_max_heap": 262144,
"java_total_heap": 151331,
"java_free_heap": 62762,
"total_pss": 342870,
"rss": 447748,
"native_total_heap": 109664,
"native_free_heap": 42273,
"interval_config": 2000
},
"timestamp": "2023-10-24T15:25:15.813000000Z",
"type": "memory_usage",
"thread_name": "main"
}
],
"resource": {
"app_build": "50453",
"app_unique_id": "org.wikipedia.dev",
"app_version": "2.7.50453-dev-2023-10-14",
"device_density": 2.75,
"device_density_dpi": 440,
"device_height_px": 2154,
"device_is_foldable": true,
"device_is_physical": false,
"device_manufacturer": "Google",
"device_model": "sdk_gphone64_arm64",
"device_name": "emu64a",
"device_type": "phone",
"device_width_px": 1080,
"device_locale": "en-US",
"measure_sdk_version": "0.0.1-SNAPSHOT",
"os_name": "android",
"os_version": "33",
"platform": "android",
"network_type": "wifi",
"network_generation": "2g",
"network_provider": "T-Mobile"
},
"session_id": "f1fd8bb0-e226-410f-9ff5-43d8f355c542",
"timestamp": "2023-10-14T00:55:26.660000000Z"
}
37 changes: 37 additions & 0 deletions measure-android/session-samples/unobfuscated/trim_memory.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"events": [
{
"trim_memory": {
"level": "TRIM_MEMORY_RUNNING_LOW"
},
"timestamp": "2023-10-24T15:25:15.813000000Z",
"type": "trim_memory",
"thread_name": "main"
}
],
"resource": {
"app_build": "50453",
"app_unique_id": "org.wikipedia.dev",
"app_version": "2.7.50453-dev-2023-10-14",
"device_density": 2.75,
"device_density_dpi": 440,
"device_height_px": 2154,
"device_is_foldable": true,
"device_is_physical": false,
"device_manufacturer": "Google",
"device_model": "sdk_gphone64_arm64",
"device_name": "emu64a",
"device_type": "phone",
"device_width_px": 1080,
"device_locale": "en-US",
"measure_sdk_version": "0.0.1-SNAPSHOT",
"os_name": "android",
"os_version": "33",
"platform": "android",
"network_type": "wifi",
"network_generation": "2g",
"network_provider": "T-Mobile"
},
"session_id": "f1fd8bb0-e336-410f-9ff5-43d8f355c542",
"timestamp": "2023-10-14T00:55:26.660000000Z"
}
Loading

0 comments on commit 0b14672

Please sign in to comment.