xk6-disruptor
xk6-disruptor copied to clipboard
Remove Profiler from runtime environment
Since #172 an abstraction for the runtime environment was introduced with the goal of facilitating the testing of the agent. Among the abstractions introduced in the runtime environment, there was the Profiler, which controls the profiling of the agent execution.
The profiler is only used in the context of the profiling options added to the root command and is of no interest in other contexts. However, it still introduces some additional complexity to the runtime environment (for example, the need of creating a fake profiler for testing, even when it is not used)
Therefore, it would be beneficial to remove the Profiler
from the runtime environment and make it accessible from the runtime package.
The main drawback of this change would be that it prevents creating a mock for the profiler in case we want to test how the agent starts/stops it.