From 991d35b2e3352bc247169bd5b42bbf0cad855dc9 Mon Sep 17 00:00:00 2001 From: droidbg Date: Fri, 8 Dec 2023 09:28:45 +0530 Subject: [PATCH] Fix. typos in leak_tracker --- doc/BASELINE.md | 2 +- doc/DETECT.md | 2 +- doc/TROUBLESHOOT.md | 4 ++-- doc/USAGE.md | 2 +- pkgs/leak_tracker/lib/src/leak_tracking/primitives/model.dart | 4 ++-- pkgs/leak_tracker/lib/src/usage_tracking/model.dart | 2 +- pkgs/leak_tracker/test/test_infra/data/messages.dart | 2 +- pkgs/leak_tracker_flutter_testing/lib/src/test_widgets.dart | 2 +- pkgs/memory_usage/lib/src/model.dart | 2 +- tool/diagrams.sh | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/doc/BASELINE.md b/doc/BASELINE.md index bf0b4089..5b878583 100644 --- a/doc/BASELINE.md +++ b/doc/BASELINE.md @@ -66,7 +66,7 @@ Flutter tests. ## Regression testing -If you want your tests to fail in case of significant diviation from baseline, +If you want your tests to fail in case of significant deviation from baseline, please, upvote and comment the issue: https://github.com/dart-lang/leak_tracker/issues/120. ## Other than RSS values diff --git a/doc/DETECT.md b/doc/DETECT.md index 35c2db8c..bcb92ae5 100644 --- a/doc/DETECT.md +++ b/doc/DETECT.md @@ -184,6 +184,6 @@ Leak tracking impacts CPU in two areas: in profile mode on `macos`. 2. Regular asynchronous analysis of the tracked objects. - Took ~2.5 millisectonds for + Took ~2.5 milliseconds for [Gallery](https://github.com/flutter/gallery) home page in profile mode on `macos`. diff --git a/doc/TROUBLESHOOT.md b/doc/TROUBLESHOOT.md index fb9d02df..40857437 100644 --- a/doc/TROUBLESHOOT.md +++ b/doc/TROUBLESHOOT.md @@ -15,7 +15,7 @@ Follow the rules to avoid/fix notGCed and notDisposed leaks: 1. **Ownership**. Every disposable object should have clear owner that manages its lifecycle. 2. **Disposal**. The owner should invoke the object's `dispose`. -3. **Release**. The owner should null referernce to the disposed object, if its `dispose` happens earlier than owner's disposal. +3. **Release**. The owner should null reference to the disposed object, if its `dispose` happens earlier than owner's disposal. 4. **Weak referencing**. Non-owners should either link the object with WeakReference, or make sure to release the references before the owner disposed the object. @@ -100,7 +100,7 @@ TODO: link DevTools documentation with explanation ## Verify object references If you expect an object to be not referenced at some point, -but not sure, you can validate it by temporaryly adding assertion. +but not sure, you can validate it by temporarily adding assertion. ```dart final ref = WeakReference(myObject); diff --git a/doc/USAGE.md b/doc/USAGE.md index 2998a7da..3545820b 100644 --- a/doc/USAGE.md +++ b/doc/USAGE.md @@ -3,7 +3,7 @@ This page describes how to configure memory usage tracking. See other information on memory leaks [here](../README.md). -Dart and Flutter applications can be confugured to automatically +Dart and Flutter applications can be configured to automatically trigger memory usage events and, in case of memory overuse, to save memory heap snapshots to hard drive. The snapshots can be later analysed in DevTools. diff --git a/pkgs/leak_tracker/lib/src/leak_tracking/primitives/model.dart b/pkgs/leak_tracker/lib/src/leak_tracking/primitives/model.dart index 421eff40..c6f713da 100644 --- a/pkgs/leak_tracker/lib/src/leak_tracking/primitives/model.dart +++ b/pkgs/leak_tracker/lib/src/leak_tracking/primitives/model.dart @@ -188,7 +188,7 @@ class LeakDiagnosticConfig { /// If true, retaining path will be collected for non-GCed objects. /// - /// The collection of retaining path is a blocking asyncronous call. + /// The collection of retaining path is a blocking asynchronous call. /// In release mode this flag does not work. final bool collectRetainingPathForNotGCed; @@ -294,7 +294,7 @@ class LeakTrackingConfig { /// of validation for leaks. /// /// If the number is too big, the performance may be seriously impacted. - /// If null, the path will be srequested without limit. + /// If null, the path will be requested without limit. final int? maxRequestsForRetainingPath; } diff --git a/pkgs/leak_tracker/lib/src/usage_tracking/model.dart b/pkgs/leak_tracker/lib/src/usage_tracking/model.dart index d70a71c8..62ba9e85 100644 --- a/pkgs/leak_tracker/lib/src/usage_tracking/model.dart +++ b/pkgs/leak_tracker/lib/src/usage_tracking/model.dart @@ -37,7 +37,7 @@ class MemoryUsageEvent { } } - /// Difference with previouse rss value. + /// Difference with previous rss value. /// /// Equals to `null` for first event. final int? delta; diff --git a/pkgs/leak_tracker/test/test_infra/data/messages.dart b/pkgs/leak_tracker/test/test_infra/data/messages.dart index 0cffeb20..4779c954 100644 --- a/pkgs/leak_tracker/test/test_infra/data/messages.dart +++ b/pkgs/leak_tracker/test/test_infra/data/messages.dart @@ -15,7 +15,7 @@ final messages = [ // Requests to app. RequestForLeakDetails(), - // Successfull responses from app. + // Successful responses from app. Leaks({}), // Error responses from app. diff --git a/pkgs/leak_tracker_flutter_testing/lib/src/test_widgets.dart b/pkgs/leak_tracker_flutter_testing/lib/src/test_widgets.dart index 5517b52f..4017f5ac 100644 --- a/pkgs/leak_tracker_flutter_testing/lib/src/test_widgets.dart +++ b/pkgs/leak_tracker_flutter_testing/lib/src/test_widgets.dart @@ -106,7 +106,7 @@ void testWidgetsWithLeakTracking( LeakTracking.phase = const PhaseSettings.ignored(); } - // Temporarily turn off leak tracking, so that `testWidgests` does not track leaks in addition. + // Temporarily turn off leak tracking, so that `testWidgets` does not track leaks in addition. final originalGlobalSettings = LeakTesting.settings; LeakTesting.settings = LeakTesting.settings.withIgnoredAll(); diff --git a/pkgs/memory_usage/lib/src/model.dart b/pkgs/memory_usage/lib/src/model.dart index 2e3f6e7c..e3cb1450 100644 --- a/pkgs/memory_usage/lib/src/model.dart +++ b/pkgs/memory_usage/lib/src/model.dart @@ -37,7 +37,7 @@ class MemoryUsageEvent { } } - /// Difference with previouse rss value. + /// Difference with previous rss value. /// /// Equals to `null` for first event. final int? delta; diff --git a/tool/diagrams.sh b/tool/diagrams.sh index 5917b54a..9ce3dc75 100644 --- a/tool/diagrams.sh +++ b/tool/diagrams.sh @@ -4,7 +4,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -# Regenerates dependency disgrams for all packages in the repo. +# Regenerates dependency diagrams for all packages in the repo. # Fast fail the script on failures. set -ex