fnx_profiler 0.9.1

  • README.md
  • Installing
  • Versions
  • 53


A library for Dart developers. It is awesome!

fnx_profiler is an "imperative" profiler. You manually mark blocks of code you want to profile. Profiler is hierarchical, you can add children to it and grandchildren to them, whole clans of profilers will help you to drill down to that performance bottleneck.

Use it like this:

import 'package:fnx_profiler/fnx_profiler.dart'

Profiler p = openRootProfiler("root");
// do something expensive

Or this:

Profiler p = openRootProfiler("root");
for (int a=0; a<3; a++) {
    Profiler ch = p.openChild("child");
    // do something nested

Or even this:

Profiler p = openRootProfiler("root");
await p.profileFuture("future", someFuture);

Yes, it's pretty straightforward, even naive, but it works. Run your code, check the results at the end, find the bottleneck, optimize and repeat.


Please see the full example. Example generates this output:

name                   |     calls|  avg (ms)|  min (ms)|  max (ms)|
root                   |         1|    1219.0|      1219|      1219|
root.child0            |         1|     116.0|       116|       116|
root.child0.grandchild |         5|      22.6|        21|        24|
root.child1            |         1|     125.0|       125|       125|
root.child1.grandchild |         5|      24.6|        22|        26|
root.child2            |         1|     123.0|       123|       123|
root.child2.grandchild |         5|      24.2|        23|        25|
root.myFunction        |        10|      44.2|        42|        45|
root.myFuture          |        10|      33.4|        30|        35|

Features and bugs

Please file feature requests and bugs on Github.



  • fixed typo in documentation: beginRootProfiler should be openRootProfiler


  • Initial version, created by Stagehand

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  fnx_profiler: "^0.9.1"

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

      import 'package:fnx_profiler/fnx_profiler.dart';
Version Uploaded Documentation Archive
0.9.1 Jan 12, 2017 Go to the documentation of fnx_profiler 0.9.1 Download fnx_profiler 0.9.1 archive
0.9.0 Sep 15, 2016 Go to the documentation of fnx_profiler 0.9.0 Download fnx_profiler 0.9.0 archive


We analyzed this package on Jun 19, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.63.0
  • pana: 0.11.3


Describes how popular the package is relative to other packages. [more]
24 / 100
Code health derived from static analysis. [more]
98 / 100
Reflects how tidy and up-to-date the package is. [more]
56 / 100
Overall score:
Weighted score of the above. [more]
Learn more about scoring.


Detected platforms: Flutter, web, other

No platform restriction found in primary library package:fnx_profiler/fnx_profiler.dart.


  • Package is getting outdated.

    The package was released 74 weeks ago.

  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 2 hints.

    Run dartfmt to format lib/fnx_profiler.dart.

    Run dartfmt to format lib/src/fnx_profiler_base.dart.

  • Use analysis_options.yaml.

    Rename old .analysis_options file to analysis_options.yaml.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.0.0 <2.0.0
Dev dependencies
test >=0.12.0 <0.13.0