Class ProfilerBatchResult
The result of a multi iteration benchmark session.
The ProfilerBatchResult consolidates all ProfilerResult result items of a single benchmark run
and provides meta data on hte collected data.
Inherited Members
Namespace: BionicCode.Utilities.Net
Assembly: BionicCode.Utilities.Net.Common.dll
Syntax
public class ProfilerBatchResult
Remarks
For example, the ProfilerBatchResult is returned by multi-run benchmark methods like LogTimeAsync(Func<Task>, Int32).
Properties
| Improve this Doc View SourceAverageDuration
The average duration of all logged iterations.
Declaration
public TimeSpan AverageDuration { get; }
Property Value
| Type | Description |
|---|---|
| TimeSpan | The average duration of all iterations. |
HasCancelledProfiledTask
In case ansync operation was benchmarked, this property returns whether the Task was cancelled or not.
Declaration
public bool HasCancelledProfiledTask { get; }
Property Value
| Type | Description |
|---|---|
| Boolean | true if the benchmark series contains a cancelled run (where the Task is cancelled). |
IterationCount
The number of iterations the Profiler has run the specified operation.
Declaration
public int IterationCount { get; }
Property Value
| Type | Description |
|---|---|
| Int32 | The number of iterations (which is equivalent to the number of results). |
MaxResult
The greatest ProfilerResult result of the batch run (which is the slowest).
Declaration
public ProfilerResult MaxResult { get; }
Property Value
| Type | Description |
|---|---|
| ProfilerResult |
MinResult
The smallest ProfilerResult result of the batch run (which is the fastest).
Declaration
public ProfilerResult MinResult { get; }
Property Value
| Type | Description |
|---|---|
| ProfilerResult |
Results
The logged results of each iteration.
Declaration
public IEnumerable<ProfilerResult> Results { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<ProfilerResult> | The results of each iteration. |
Summary
A report of the benchmarking ready for output, formatted as follows:
╭───────────────┬────────────────────────────┬────────────────╮
| Iteration # │ Duration [ms] │ Is cancelled |
┝━━━━━━━━━━━━━━━┿━━━━━━━━━━━━━━━━━━━━━━━━━━━━┿━━━━━━━━━━━━━━━━┥
│ 1 │ 1.0512 │ False |
│ 2 │ 1.0020 │ False │
│ 3 │ 0.8732 │ False │
│ 4 │ 0.0258 │ True (ignored) │
│ 5 │ 0.9943 │ False │
╭═════════╧═══════════════╪════════════════════════════┼────────────────┤
│ Total: - │ 3.9207 │ │
│ Min: 3 │ 0.8732 │ │
│ Max: 1 │ 1.0512 │ │
│ Average: - │ 0.9802 │ │
╰─────────────────────────┴────────────────────────────┴────────────────╯
Declaration
public string Summary { get; }
Property Value
| Type | Description |
|---|---|
| String | A formatted string that presents the results of the benchmarking in an Unicode formatted table. |
TotalDuration
The total duration of all logged iterations.
Declaration
public TimeSpan TotalDuration { get; }
Property Value
| Type | Description |
|---|---|
| TimeSpan | The sum of each duration per iteration. |