graphaware / neo4j-framework

GraphAware Neo4j Framework
244 stars 68 forks source link

stopwatch into framework #42

Closed ikwattro closed 8 years ago

ikwattro commented 8 years ago

@bachmanm please tell me what you think.

Good replacement for manually using System.currentTimeMillis() :

Example :


Stopwatch stopwatch = new Stopwatch();

stopwatch.start("engine1");
// find candidates()
Event e1 = stopwatch.stop("engine1");
System.out.println(e1.duration());

stopwatch.start("complexWorker");
stopwatch.lap("complexWorker");
stopwatch.lap("complexWorker");
Event e2 = stopwatch.stop("complexWorker");
System.out.println(e2.duration());
System.out.println(e2.getPeriods.get(0).duration());