Fixture methods

Report a typo

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; 
    }
}
Select one option from the list
___

Create a free account to access the full topic