Skip to content

rajmaniar/async_profiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Profiles Async function

Profile async function call stack.

Usage

A simple usage example:

import 'package:async_profiler/async_profiler.dart';

main() async {
  asyncProfiler = AsyncProfiler();
  await asyncProfiler.profile(() {
    //Your Async Code
  });

  asyncProfiler.profileResults; //String representation of frames collected per function call.
  asyncProfiler.elapsedMilliseconds; //Total time the profiler has been running.
  asyncProfiler.frames; //All StackFrame objects.
}

Features and bugs

  • Profiles an async function
  • Reports the total elapsed time after each call
  • Produces a terse stack trace for each function call. NB: stack traces are slow to be careful in high load environments

Improvements

  • Custom call backs for collecting samples other than time.

About

AsyncProfiler

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages