-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from embrace-io/revert-2-update-flutter-docs
Revert "Update flutter docs for 3.0.0"
- Loading branch information
Showing
18 changed files
with
303 additions
and
186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
title: Moments | ||
description: Measure the performance of your Flutter application using Embrace | ||
sidebar_position: 1 | ||
--- | ||
|
||
# Moments | ||
|
||
## Overview | ||
|
||
Embrace also contains a powerful stopwatch and abandonment tracking feature, which we call **moments**. | ||
This mechanism is the same one used to measure application launch performance, which we covered in the [Session Reporting](/flutter/integration/session-reporting) section. | ||
|
||
## Starting a Moment | ||
|
||
Here's how you start a moment. | ||
|
||
```dart | ||
Embrace.instance.startMoment('addItem'); | ||
``` | ||
|
||
In a sample scenario, this is a moment we're using to measure how quickly an item is added to a list after a user selects the plus button. | ||
|
||
You can also start a moment with **properties** and **identifier**. | ||
For more on this, check out the [API docs](/api/flutter/). | ||
|
||
import PropertyLimit from '@site/shared/property-limit.md'; | ||
|
||
<PropertyLimit /> | ||
|
||
## Ending a Moment | ||
|
||
Next, here's how you end a moment. | ||
|
||
```dart | ||
Embrace.instance.endMoment('addItem'); | ||
``` | ||
|
||
A timer is started once you make a call to start a moment. | ||
If you end the moment within a configurable threshold, then the timer ends and the client's measurement is used to report performance. | ||
You can end the moment from multiple locations in your app. | ||
|
||
## Tracking Abandonment | ||
|
||
In addition to measuring performance, moments can also measure abandonment. | ||
Moments measure abandonment by default. If the moment never completes, because: | ||
|
||
- the user exits the app before the moment ends | ||
- the app crashes | ||
- an unexpected code path is taken |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.