Closed swtrse closed 3 months ago
@timcassell I almost get a guilty conscience because I always have to follow up and disagree. I have now repeated the test with the Config (DebugInProcessConfig). GlobalSetup is also called several times in this case even if the setting parameters do not change.
Disagree with what? I mentioned in that comment that it is ran once per benchmark. If you want it to only run once total, you have to make it behave that way manually.
Ah I get it. I did misunderstood your comment in the other issue.
After getting deeper into benchmarks and attempts to speed up certain tests I run into an unexpected behavior. I was wondering if that is intentional or I found a bug in the system.
My benchmark is designed like this
Now what I see in the Logs is that the Test runs like
I do get that Iteration Setups are running multiple times for Overhead detection. Prepare the prerequisites for each call of Benchmark1() and so on. That is ok. What looks like an error to me is that the Global Setup is running every time too. Even when the Benchmark Settings did not change. I noticed this because I wanted to do some heavy lifting in the Global Setup expecting that for each (Runtime, MyProperty1, MyProperty2, T) the Global Setup runs just once. So what I did expect was