google / perf_api.dart

Apache License 2.0
8 stars 19 forks source link

feat(Console Profiler): Allow multiple timers with the same name #9

Closed vicb closed 9 years ago

vicb commented 10 years ago

@pavelgj does "// TODO: change this to use a multimap." means that we want to support multiple timers with the same name ?

If this is the case this is what I implemented in this PR. It passes smoke tests but I'll write unit tests once you confirm the expected behavior.

ref smoke test

  var profiler = new ConsoleProfiler();

  profiler.startTimer('foo', '1');
  profiler.startTimer('bar', '1');
  profiler.startTimer('foo', '2');

  profiler.stopTimer('foo');
  profiler.stopTimer('bar');