I am benchmarking TypeScript's language service binary and I'm currently spawning the tsserver process in a beforeAll hook and then killing the process in an afterAll hook. However, I noticed that running the warmup does not run the task's beforeAll and afterAll hooks, but it does run the bench's setup and teardown hooks. Since I'm shooting out different versions of the TypeScript compiler against each other, I cannot move my setup and teardown into the bench's setup/teardown lifecycle since each Task needs to setup a different server.
I am benchmarking TypeScript's language service binary and I'm currently spawning the
tsserver
process in abeforeAll
hook and then killing the process in anafterAll
hook. However, I noticed that running the warmup does not run the task'sbeforeAll
andafterAll
hooks, but it does run the bench'ssetup
andteardown
hooks. Since I'm shooting out different versions of the TypeScript compiler against each other, I cannot move my setup and teardown into the bench's setup/teardown lifecycle since eachTask
needs to setup a different server.Here is a portion of my benchmarking code: