9. Februar 2012

Perf4J plugin for Grails logs the time

A new plugin for Grails is in the oven and is still baking. However, the first rumours got out of the bakery. :-)

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 Artikel könnten Sie noch interessieren:

  1. Grails Paypal plugin 0.3 released The Grails plugins project has accepted me as a committer....
  2. Released OpenID plugin V0.2 for Grails Today, I released version 0.2 of the OpenID plugin for...
  3. Grails-Plugin: iCalendar Builder iCalendar ist ein allgemein anerkanntes Format zur Übertragung von Kalender-Ereignissen...
  4. Grails-Plugin: Circuit Breaker Interessantes Architekturkonzept: Wenn das System in Bedrängnis gerät, lasse die...
  5. Grails Paypal Plugin V0.4 released Today, I released the Grails Paypal Plugin again, the new...

Kommentare

  1. Daniel Rinser meint:

    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

Ihre Meinung ist uns wichtig

*