Perf4J is to System.currentTimeMillis() as log4j is to System.out.println().
Using Perf4J, you will be able to stop the time for a Grails code block, like this:
withStopwatch("myCriticalCodeBlock") { // code to be profiled with tag "myCriticalCodeBlock" }
You can also log the time for a service method, automatically, choose one or more of these alternatives:
static profiled = true static profiled = ['testMethod1', 'testMethod3'] static profiled = { testMethod1() testMethod2(tag: "tm2") testMethod3(message: "only message") testMethod4(tag: "tm4", message: "this is testMethod4()") }
Got the taste of it? Read the full story about the upcoming plugin and enjoy!
Diese Beiträge könnten Sie noch interessieren:
- Pretty cool Eclipse plugin for editing resource bundles
- Mit TDD schreibt man Spezifikationen
- Get the trucks off your Kanban board!
- Welcome back, Uncle Bob! [OOP 2010]
- New website using content management
Berater, Coach und Trainer für effektive Produktentwicklung
Hi Matthias,
thanks a lot for featuring my plugin! I’ve just applied some finishing touches and I’m now looking for some people to test the pre-release to get some feedback. So, in case you (or somebody else) is interested, drop me a line (mail/grails-user mailing list). Feedback on the documentation is also very welcome.
Cheers,
Daniel