-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
183 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using System; | ||
|
||
namespace MeasureMap.TaskHandlers | ||
{ | ||
/// <summary> | ||
/// TaskHandler that executes a delegate after the taskrun | ||
/// </summary> | ||
public class OnExecutedTaskHandler : TaskHandler | ||
{ | ||
private readonly Action<IIterationResult> _execution; | ||
|
||
/// <summary> | ||
/// | ||
/// </summary> | ||
/// <param name="execution"></param> | ||
public OnExecutedTaskHandler(Action<IIterationResult> execution) | ||
{ | ||
_execution = execution; | ||
} | ||
|
||
/// <summary> | ||
/// Executes the task | ||
/// </summary> | ||
/// <param name="context">The current execution context</param> | ||
/// <returns>The resulting collection of the executions</returns> | ||
public override IIterationResult Run(IExecutionContext context) | ||
{ | ||
var result = base.Run(context); | ||
|
||
System.Threading.Tasks.Task.Run(() => _execution.Invoke(result)); | ||
|
||
return result; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...sureMap.UnitTest/Tracers/_Snapshots/TracerTests_Tracer_Profiler_Options_Delegate.snapshot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
---data | ||
# MeasureMap - Profiler result | ||
## Summary | ||
| Category | Metric | Value | | ||
| :------- | :---------------- | ---------------: | | ||
| Warmup | Duration Warmup | 00:00:00 | | ||
| Setup | Threads | 2 | | ||
| | Iterations | 20 | | ||
| Duration | Duration | 00:00:00.0000270 | | ||
| | Total Time | 00:00:00.0000270 | | ||
| | Avg. Time | 00:00:00.0000013 | | ||
| | Avg. Milliseconds | 0.0013 ms | | ||
| | Throughput | 740740.74074/s | | ||
| | Fastest | 00:00:00.0000009 | | ||
| | Slowest | 00:00:00.0000018 | | ||
| Memory | Memory init size | 0 | | ||
| | Memory end size | 0 | | ||
| | Memory increase | 0 | | ||
|