How to handle database setup/cleanhup in benchmark.net?

401 Views Asked by At

I want to benchmark different "INSERT" implementations into a database (EF, Dapper, etc) but don't know how and where to handle the SETUP and CLEANUP of the database.

There is a GlobalSetup and an IterationSetup method in Benchmark.net, but in the documentation it is said that CPU intensive operations can skew the results. This confused me, because I don't care about the Setup/Cleanup stuff w.r.t runtime (I only care about the specific INSERT function, which expects a correct database).

How do I handle Setup/Cleanup of a database for functions that I want to benchmark with benchmark.net?

0

There are 0 best solutions below