-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Description
I'm trying to execute a basic example but I'm getting an exception.
@Grab(group='org.gperfutils', module='gbench', version='0.4.2-groovy-2.3')
import groovyx.gbench.*
def r = benchmark {
'Parallel Assignment' {
def (a, b, c, d, e, f, g, h) = [1, 2, 3, 4, 5, 6, 7, 8]
}
'Sequential Assignment' {
def a = 1
def b = 2
def c = 3
def d = 4
def e = 5
def f = 6
def g = 7
def h = 8
}
}
r.prettyPrint()
Environment
===========
* Groovy: 2.3.8
* JVM: Java HotSpot(TM) 64-Bit Server VM (24.71-b01, Oracle Corporation)
* JRE: 1.7.0_71
* Total Memory: 156 MB
* Maximum Memory: 1820.5 MB
* OS: Mac OS X (10.10.1, x86_64)
Options
=======
* Warm Up: Auto (- 60 sec)
* CPU Time Measurement: On
Exception thrown
java.lang.NoClassDefFoundError: java/util/function/Consumer
at groovyx.gbench.BenchmarkBuilder.doRun(BenchmarkBuilder.groovy:87)
at groovyx.gbench.BenchmarkBuilder.this$2$doRun(BenchmarkBuilder.groovy)
at groovyx.gbench.BenchmarkBuilder$this$2$doRun$1.callCurrent(Unknown Source)
at groovyx.gbench.BenchmarkBuilder.run(BenchmarkBuilder.groovy:83)
at groovyx.gbench.BenchmarkBuilder$run.call(Unknown Source)
at groovyx.gbench.BenchmarkStaticExtension.benchmark(BenchmarkStaticExtension.groovy:33)
at groovyx.gbench.BenchmarkStaticExtension.benchmark(BenchmarkStaticExtension.groovy)
at ConsoleScript0.run(ConsoleScript0:4)
Caused by: java.lang.ClassNotFoundException: java.util.function.Consumer
... 8 more
In the other hand, I try with the Benchmark annotation transformation and works fine!
@Grab(group='org.gperfutils', module='gbench', version='0.4.2-groovy-2.3')
import groovyx.gbench.*
@groovyx.gbench.Benchmark
void 'Parallel Assignment'() {
def (a, b, c, d, e, f, g, h) = [1, 2, 3, 4, 5, 6, 7, 8]
}
@groovyx.gbench.Benchmark
void 'Sequential Assignment'() {
def a = 1
def b = 2
def c = 3
def d = 4
def e = 5
def f = 6
def g = 7
def h = 8
}
'Parallel Assignment'()
'Sequential Assignment'()
benchmark void Parallel Assignment() user:141000 system:6000 cpu:147000 real:163000
benchmark void Sequential Assignment() user:1000 system:4000 cpu:5000 real:26000
Metadata
Metadata
Assignees
Labels
No labels