This is a SQLite shell command, written in C around the calls to SQLite proper. Therefore, you would write such a thing in your host language. Many programming systems have packages for benchmarking. Perhaps if you said what your host language for SQLite was, some of us could suggest one?