Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve documentation #60

Merged
merged 6 commits into from
Oct 22, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
++
littleGnAl committed Oct 22, 2024

Unverified

This user has not yet uploaded their public signing key.
commit 2096416f85ee32d88ba0375a0daa2a0f1aa97b7f
18 changes: 9 additions & 9 deletions lib/src/glance.dart
Original file line number Diff line number Diff line change
@@ -88,7 +88,7 @@ class GlanceConfiguration {
/// After obtaining the [JankReport.stackTrace], you can symbolize it using the `flutter symbolize` command.
/// For more details, see https://docs.flutter.dev/deployment/obfuscate#read-an-obfuscated-stack-trace.
/// You can save the stack traces to files or upload them to your server and symbolize them later.
///
///
/// For example:
/// ```dart
/// // Implement your `JankDetectedReporter`
@@ -110,17 +110,17 @@ class GlanceConfiguration {
/// runApp(const MyApp());
/// }
/// ```
///
///
/// ## How it works
/// `glance` starts a dedicated [Isolate] internally to capture Dart UI thread stack traces using native stack unwinding.
/// `glance` starts a dedicated [Isolate] internally to capture Dart UI thread stack traces using native stack unwinding.
/// Refer to [Sampler] for more details.
///
/// To detect UI jank, `glance` extends [WidgetsFlutterBinding] and monitors execution time between [WidgetsFlutterBinding.handleBeginFrame]
/// and [WidgetsFlutterBinding.handleDrawFrame] during the rendering phase. It also tracks various callbacks such as [WidgetBindingObserver],
/// touch events, and method channel callbacks' invocations, checking each against its execution time.
///
/// To detect UI jank, `glance` extends [WidgetsFlutterBinding] and monitors execution time between [WidgetsFlutterBinding.handleBeginFrame]
/// and [WidgetsFlutterBinding.handleDrawFrame] during the rendering phase. It also tracks various callbacks such as [WidgetBindingObserver],
/// touch events, and method channel callbacks' invocations, checking each against its execution time.
/// Jank is detected when the execution time exceeds the [GlanceConfiguration.jankThreshold].
///
/// Upon detecting jank, `glance` fetches stack traces from the [Sampler] during the jank period and reconstructs them into Dart stack traces.
///
/// Upon detecting jank, `glance` fetches stack traces from the [Sampler] during the jank period and reconstructs them into Dart stack traces.
/// These are then reported to the [GlanceReporter], specified via [GlanceConfiguration.reporters].
abstract class Glance {
Glance._();