-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
docs(ios): update feature documentation #1863
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Measure SDK calculates CPU usage by retrieving task and thread information from the system. It uses `task_info` to gather overall task details and `task_threads` to obtain a list of active threads. Then, `thread_info` is used to extract CPU usage from each thread. The CPU usage of all threads is summed up and converted into a percentage of the total available CPU time. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Links to documentation of task_info
and task_threads
would help understand this better. Also, some more details around the same in the doc will be useful:
What are task_info and task_thread, how is the percentage of total available CPU time calculated?
- On average, it takes **4 ms** to identify the clicked view in a view hierarchy with a depth of **1,500**. | ||
- For more common scenarios, a view hierarchy with a depth of **20** takes approximately **0.2 ms**. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Links to the benchmark code (if any) would be useful here.
@@ -0,0 +1,27 @@ | |||
# Feature - Gesture Tracking |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a link to the data collected for gesture events similar to android:
https://github.com/measure-sh/measure/blob/ios-documentation/docs/android/features/feature_cpu_monitoring.md#data-collected
|
||
| Screenshot | Layout snapshot | | ||
|-------------------------------------------------------|--------------------------------------------------| | ||
|  |  | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a layout snapshot example from an iOS device.
Once a [gesture is detected](feature_gesture_tracking.md), the layout is parsed by going over every element, recording dimensions and size information. | ||
The result is then converted into an SVG and tracked as an [attachment](../../api/sdk/README.md#attachments). | ||
|
||
## Impact on Performance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section is empty, we could provide the names of traces added for this purpose if any.
7. initWithNibName | ||
8. initWithCoder | ||
|
||
You can also track `loadView` and `deinit` by from `MeasureViewController` for swift and `MSRViewController` for ObjC. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a usage example to clearly show how to use this. Also, anything that requires manual setup must also be documented in the main README.md
file.
|
||
## SwiftUI lifecycle | ||
|
||
Measure can track SwiftUI component's `onAppear` and `onDisappear` if you wrap your view with the `MsrMoniterView`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a usage example to clearly show how to use this. Also, anything that requires manual setup must also be documented in the main README.md
file.
|
||
### How it works | ||
|
||
Measure SDK provides `MsrMoniterView`, a wrapper view that listens for SwiftUI lifecycle events. The `MsrMoniterView` ensures that each appearance event is only triggered once per lifecycle instance. Additionally, you can use the `moniterWithMsr` extension to conveniently wrap any SwiftUI view. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a usage example to clearly show how to use moniterWithMsr
. Also, anything that requires manual setup must also be documented in the main README.md
file.
@@ -7,5 +7,11 @@ | |||
All the features supported by the Measure SDK are listed below. | |||
|
|||
* [App launch](features/feature_app_launch.md) | |||
* [Crash tracking](features/feature_crash_tracking.md) | |||
* [Network monitoring](features/feature_network_monitoring.md) | |||
* [Network changes](features/feature_network_changes.md) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the network changes documentation we should clearly mention that this is only available upto iOS 16.4.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also consider removing it if this will no longer be available in fufture and if there are no alternatives.
@@ -7,5 +7,11 @@ | |||
All the features supported by the Measure SDK are listed below. | |||
|
|||
* [App launch](features/feature_app_launch.md) | |||
* [Crash tracking](features/feature_crash_tracking.md) | |||
* [Network monitoring](features/feature_network_monitoring.md) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Give a more detailed usage example to use
NetworkInterceptor
. - Consider renaming the
NetworkInterceptor
toMsrNetworkInterceptor
. - Anything that requires manual setup must also be documented in the main
README.md
file.
Description
iOS documentation added
Related issue
Closes #1583