Line | |
---|
1 | #region License Information |
---|
2 | /* |
---|
3 | * This file is part of SimSharp which is licensed under the MIT license. |
---|
4 | * See the LICENSE file in the project root for more information. |
---|
5 | */ |
---|
6 | #endregion |
---|
7 | |
---|
8 | using System; |
---|
9 | using System.Collections.Generic; |
---|
10 | |
---|
11 | namespace SimSharp { |
---|
12 | public interface IMonitor { |
---|
13 | bool Active { get; set; } |
---|
14 | string Name { get; } |
---|
15 | |
---|
16 | string Summarize(); |
---|
17 | |
---|
18 | |
---|
19 | event EventHandler Updated; |
---|
20 | } |
---|
21 | |
---|
22 | public interface INumericMonitor : IMonitor { |
---|
23 | bool Collect { get; } |
---|
24 | |
---|
25 | double Min { get; } |
---|
26 | double Max { get; } |
---|
27 | double Sum { get; } |
---|
28 | double Mean { get; } |
---|
29 | double StdDev { get; } |
---|
30 | double Last { get; } |
---|
31 | |
---|
32 | double GetMedian(); |
---|
33 | double GetPercentile(double p); |
---|
34 | } |
---|
35 | |
---|
36 | public interface ISampleMonitor : INumericMonitor { |
---|
37 | void Add(double value); |
---|
38 | IEnumerable<double> Samples { get; } |
---|
39 | } |
---|
40 | |
---|
41 | public interface ITimeSeriesMonitor : INumericMonitor { |
---|
42 | void Increase(double value); |
---|
43 | void Decrease(double value); |
---|
44 | void UpdateTo(double value); |
---|
45 | } |
---|
46 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.