Which of these methods will be invoked first?
@State(Scope.Thread)
public class MyBenchmark {
String str;
@Setup()
public void doSetup() {
str = "Hello";
}
@Benchmark
public String testMethod() {
return str.toUpperCase();
}
@TearDown()
public void doTearDown() {
str = null;
}
}