You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The diagnoser support is implemented on top of result reporting. This hurts as there're additional allocations, and there's no proper synchronization. The diagnoser can receive signal after the benchmark was actually started.
To be honest I have no good idea how to fix it. As initial proposal:
Add diagnoser run as a separate engine stage.
During run-with-diagnoser stage:
Notify the diagnoser using any system synchronization primitive (e.g ManualResetEvent) (we do not want to allocate anything during run).
Wait for confirmation from the host (we do not want to run iteration until diagnoser receives the notification).
Run the iteration.
Notify diagnoser the run was completed & wait for confirmation.
During normal stages:
Do not write anything into console / output.
Result reporting should be responsibility of the caller, engine should only collect measurements into preallocated list.
I think, there's no need to use any framework for IPC as it'll incur additional allocations and it'll add more latency. Not to mention there's no such lightweight framework out-of-the-box, only sockets, pipes and mem-mapped files available for netCore.
DISCLAIMER: this issue is only to start a discussion, I have no good solution for it yet, sorry.
There're two major issues with current engine implementation.
Engine should report measurements by itself, as here. If missed, things go wrong; see [BUG] NRE in OutliersAnalyser #296.
The diagnoser support is implemented on top of result reporting. This hurts as there're additional allocations, and there's no proper synchronization. The diagnoser can receive signal after the benchmark was actually started.
To be honest I have no good idea how to fix it. As initial proposal:
Add diagnoser run as a separate engine stage.
During run-with-diagnoser stage:
During normal stages:
I think, there's no need to use any framework for IPC as it'll incur additional allocations and it'll add more latency. Not to mention there's no such lightweight framework out-of-the-box, only sockets, pipes and mem-mapped files available for netCore.