src.demo.ManualWarmUpDemo.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gbench Show documentation
Show all versions of gbench Show documentation
GBench, benchmarking framework for Groovy
def bm = new groovyx.gbench.BenchmarkBuilder().run(warmUpTime:3, verbose:true) {
'StringBuilder' {
def sb = new StringBuilder()
sb.append('foo')
sb.append('bar')
sb.append('baz')
sb.toString()
}
'StringBuffer' {
def sb = new StringBuffer()
sb.append('foo')
sb.append('bar')
sb.append('baz')
sb.toString()
}
}
bm.prettyPrint()