-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy pathIBenchmarker.cs
More file actions
55 lines (48 loc) · 1.46 KB
/
IBenchmarker.cs
File metadata and controls
55 lines (48 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
using System;
namespace Waher.Runtime.Profiling
{
/// <summary>
/// Class that keeps track of benchmarking results and timing.
/// </summary>
public interface IBenchmarker : IDisposable
{
/// <summary>
/// Registered tests.
/// </summary>
string[] Tests { get; }
/// <summary>
/// Stops a benchmark.
/// </summary>
/// <param name="Name">Name of benchmark.</param>
/// <param name="N">Complexity of benchmark (N).</param>
/// <param name="M">Complexity of benchmark (M).</param>
/// <param name="StartTicks">Elapsed ticks at the start of benchmark.</param>
void Stop(string Name, long N, long M, long StartTicks);
/// <summary>
/// Gets benchmarking result in ticks, as script.
/// </summary>
/// <returns>Script</returns>
string GetResultScriptTicks();
/// <summary>
/// Gets benchmarking result in seconds, as script.
/// </summary>
/// <returns>Script</returns>
string GetResultScriptSeconds();
/// <summary>
/// Gets benchmarking result in milliseconds, as script.
/// </summary>
/// <returns>Script</returns>
string GetResultScriptMilliseconds();
/// <summary>
/// Gets benchmarking result in microseconds, as script.
/// </summary>
/// <returns>Script</returns>
string GetResultScriptMicroseconds();
/// <summary>
/// Removes a benchmark.
/// </summary>
/// <param name="Name">Name of benchmark.</param>
/// <returns>If the benchmark was found, and removed.</returns>
bool Remove(string Name);
}
}