NTP Analyzer  0.8.2
Analyze the operation of time servers
HostIoReading.cs
Go to the documentation of this file.
1 //
2 // Copyright (c) 2013-2017 Carsten Sonne Larsen <cs@innolan.net>
3 //
4 // Permission is hereby granted, free of charge, to any person obtaining a copy
5 // of this software and associated documentation files (the "Software"), to deal
6 // in the Software without restriction, including without limitation the rights
7 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 // copies of the Software, and to permit persons to whom the Software is
9 // furnished to do so, subject to the following conditions:
10 //
11 // The above copyright notice and this permission notice shall be included in
12 // all copies or substantial portions of the Software.
13 //
14 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 // THE SOFTWARE.
21 
22 using System;
23 
24 namespace Ntp.Analyzer.Objects
25 {
26  public sealed class HostIoReading : Reading
27  {
28  public HostIoReading(
29  int id,
30  DateTime time,
31  int zone,
32  Host host,
33  int timeSinceReset,
34  int receiveBuffers,
35  int freeReceiveBuffers,
36  int usedReceiveBuffers,
37  int lowWaterRefills,
38  long droppedPackets,
39  long ignoredPackets,
40  long receivedPackets,
41  long packetsSent,
42  long packetsNotSent,
43  int interruptsHandled,
44  int receivedByInt)
45  : base(id, time, zone, host)
46  {
47  TimeSinceReset = timeSinceReset;
48  ReceiveBuffers = receiveBuffers;
49  FreeReceiveBuffers = freeReceiveBuffers;
50  UsedReceiveBuffers = usedReceiveBuffers;
51  LowWaterRefills = lowWaterRefills;
52  DroppedPackets = droppedPackets;
53  IgnoredPackets = ignoredPackets;
54  ReceivedPackets = receivedPackets;
55  PacketsSent = packetsSent;
56  PacketsNotSent = packetsNotSent;
57  InterruptsHandled = interruptsHandled;
58  ReceivedByInt = receivedByInt;
59  }
60 
61  public HostIoReading(
62  Host host,
63  IoStatsEntry entry,
64  ReadingBulk bulk
65  )
66  : base(host, bulk)
67  {
68  TimeSinceReset = entry.TimeSinceReset;
69  ReceiveBuffers = entry.ReceiveBuffers;
70  FreeReceiveBuffers = entry.FreeReceiveBuffers;
71  UsedReceiveBuffers = entry.UsedReceiveBuffers;
72  LowWaterRefills = entry.LowWaterRefills;
73  DroppedPackets = entry.DroppedPackets;
74  IgnoredPackets = entry.IgnoredPackets;
75  ReceivedPackets = entry.ReceivedPackets;
76  PacketsSent = entry.PacketsSent;
77  PacketsNotSent = entry.PacketsNotSent;
78  InterruptsHandled = entry.InterruptsHandled;
79  ReceivedByInt = entry.ReceivedByInt;
80  }
81 
82  public int TimeSinceReset { get; }
83 
84  public int ReceiveBuffers { get; }
85 
86  public int FreeReceiveBuffers { get; }
87 
88  public int UsedReceiveBuffers { get; }
89 
90  public int LowWaterRefills { get; }
91 
92  public long DroppedPackets { get; }
93 
94  public long IgnoredPackets { get; }
95 
96  public long ReceivedPackets { get; }
97 
98  public long PacketsSent { get; }
99 
100  public long PacketsNotSent { get; }
101 
102  public int InterruptsHandled { get; }
103 
104  public int ReceivedByInt { get; }
105  }
106 }
HostIoReading(Host host, IoStatsEntry entry, ReadingBulk bulk)
HostIoReading(int id, DateTime time, int zone, Host host, int timeSinceReset, int receiveBuffers, int freeReceiveBuffers, int usedReceiveBuffers, int lowWaterRefills, long droppedPackets, long ignoredPackets, long receivedPackets, long packetsSent, long packetsNotSent, int interruptsHandled, int receivedByInt)