About Me

My photo
Author of Groovy modules: GBench, GProf, Co-author of a Java book パーフェクトJava, Game Developer at GREE

Wednesday, July 20, 2011

GBench 0.2.0 released

I released GBench 0.2.0 today. GBench is a benchmarking framework for Groovy. This framework allows you to easily benchmark for Groovy programs by providing two powerful features, an AST transformation and a builder.

What's New
  • Added support for CPU time.
  • Improved the builder API.
    • Added better (Groovier) syntax to add benchmark target code blocks.
                run {
              with 'label', {
                run {
              label {
    • Added new options for run().
      • "average", "idle", "trim". See its javadoc for usage. Thanks to Yasuharu Nakano (author of GroovyServ) for providing the source code.
      • "repeat". This option is an alternative to "time" option, but "time" option still available for backward compatibility.
    • Added new APIs.
      • sum(), average(), prettyPrint(). See their javadoc for usage.
  • Changed versioning scheme.

Resolved Issues
  • The name of the system property to specify @Benchmark's default handling contains the old domain.

  • AST transformation Example:

  • Builder Example:

Please try and let me know your feedback (via this blog's comment, the project's issue tracking system, or Twitter:@nagai_masato). Your feedback helps GBench to continue to impove.

Sunday, July 10, 2011

GBench available on Maven Central!

I'm happy to announce that GBench 11.07.05 is now available on the Maven Central Repository. It means that you can use GBench via Grape. Please try GBench and let me know your feedback!

Monday, July 4, 2011

GBench project moved to Google Code!

I moved GBench project hosting over Google Code. 


GBench is a benchmarking framework for Groovy. 
Please go to the site and try GBench!

Sunday, July 3, 2011

Groovy Quiz: How many Elvises are there?

How many Elvises are there?:


Saturday, July 2, 2011

Poison for Groovy Part 2

Unfortunately, I had success in generating a new poison for Groovy today (I already found another poison. Please read my previous post). 

There are three steps to generate it:

1. Get a Windows machine which has Groovy is installed in it. This is a VERY HARD mission.
2. Set JAVA_OPTS environment variable with a double-quoted string has a space character:
> set JAVA_OPTS=-Daprop="a value"
3. Run groovy:
> groovy -h

Then you'll get the follwing error:
value"" was unexpected at this time.

I already reported two issues related to this bug and provided patches for them (See GROOVY-4910 and GANT-126). I hope these issues will be resolved soon, Windows-specific issues are always left unresolved even if they have patches, though. 

Groovy is a cross-platform language that runs on a virtual machine, right?