@ Benchmark @ BenchmarkMode ( Mode . Throughput ) public StackFrame stackWalkerWithAnonymousClass ( ) { return StackWalker . getInstance ( ) . walk ( new Function < Stream < StackFrame > , StackFrame > ( ) { @ Override public StackFrame apply ( final Stream < StackFrame > stream ) { return stream . skip ( 1 ) . findFirst ( ) . get ( ) ; } } ) ; }
Benchmarks extracting a stack frame from stack walker by using an anonymous inner class .