#GlobalSetup
June 5, 2025 at 9:19 AM
The spread operator is significantly slower than using the special constructor when converting data to ObservableCollection (113788) https://github.com/dotnet/runtime/issues/113788
The spread operator is significantly slower than using the special constructor when converting data to ObservableCollection · Issue #113788 · dotnet/runtime
Take this benchmark for example public class ObservableCollectionBenchmark<T> { private List<T> Data; [GlobalSetup] public void Setup() { Data = Enumerable.Range(0, 10000).Select(i => (T)Convert.Ch...
github.com
March 22, 2025 at 1:11 PM
The benchmark includes a GlobalSetup method for creating a simple CSV stream, which ensures that only the parsing is measured. Proper cleanup avoids memory leaks as more benchmarks are added. #CleanupBestPractices
January 31, 2025 at 12:46 AM
They're E2E tests so I'd like to avoid mocking if at all possible.

Don't know why I initially thought avoiding an actual node:http server was the answer, but now I have a globalSetup file starting one in my Vitest suite and it's fast enough 😅

Thanks for chiming in though!
December 12, 2024 at 2:45 PM