Skip to content

Instantly share code, notes, and snippets.

View tskarman's full-sized avatar

Tobias Skarman tskarman

  • Poolarserver GmbH
  • Stuttgart
View GitHub Profile
@tskarman
tskarman / Readme.md
Created August 31, 2022 14:17 — forked from NickCraver/Readme.md
A simple LINQPad script I wrote for load testing SQL Server.

This is a simple LINQPad script I wrote one day to load test some large SQL servers. Maybe it's useful to someone. The basic premise is defining your queries once, including which ID patterns to fetch (at the bottom), and load test a mixture. The script defines everything needed in one place, then fires up the command-line linqpad runner to run many queries at once.

Params up top:

const string LinqPadPath = @"C:\Linqpad\lprun.exe";
const bool runSequential = false;
const int defaultThreads = 1;
const int defaultIterations = 2000;