Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

adwinross
Copy link
Collaborator

Description

iOS documentation added

Related issue

Closes #1583

Copy link

vercel bot commented Mar 5, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
measure-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 5, 2025 8:49am

@adwinross adwinross added docs user facing documentation ios ios related labels Mar 5, 2025
@adwinross adwinross self-assigned this Mar 5, 2025
@adwinross adwinross requested a review from abhaysood March 5, 2025 08:49
Comment on lines +7 to +8
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.

Copy link
Contributor

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?

Comment on lines +26 to +27
- 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**.
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

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


| Screenshot | Layout snapshot |
|-------------------------------------------------------|--------------------------------------------------|
| ![Screenshot](../../android/images/layoutSnapshotScreenshot.png) | ![Layout Snapshot](../../android/images/layoutSnapshot.png) |
Copy link
Contributor

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
Copy link
Contributor

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.
Copy link
Contributor

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`.
Copy link
Contributor

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.
Copy link
Contributor

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)
Copy link
Contributor

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.

Copy link
Contributor

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)
Copy link
Contributor

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 to MsrNetworkInterceptor.
  • Anything that requires manual setup must also be documented in the main README.md file.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
docs user facing documentation ios ios related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add feature documentation
2 participants