NTP Analyzer  0.8.2
Analyze the operation of time servers
Ntp.Analyzer.Process.Description.HostIoStatJob Class Reference
Inheritance diagram for Ntp.Analyzer.Process.Description.HostIoStatJob:
Collaboration diagram for Ntp.Analyzer.Process.Description.HostIoStatJob:

Public Member Functions

 HostIoStatJob (StatConfiguration config, LogBase log)
 
- Public Member Functions inherited from Ntp.Common.Process.JobDescription
override string ToString ()
 Returns a string that represents the current JobDescription. More...
 

Public Attributes

override string JobType => "Host IO statistics"
 
override int Priority => 2
 
override ThreadType ThreadType => ThreadType.MultiThreaded
 
- Public Attributes inherited from Ntp.Common.Process.JobDescription
string Name => Configuration.ConfigName
 Gets the name. More...
 

Protected Member Functions

override void InternalExecute ()
 Implementing method for descendants. More...
 
- Protected Member Functions inherited from Ntp.Common.Process.JobDescription
 JobDescription (IJobConfiguration config, LogBase log)
 Initializes a new instance of the JobDescription class. More...
 

Private Attributes

readonly StatConfiguration config
 

Additional Inherited Members

- Package Functions inherited from Ntp.Common.Process.JobDescription
void Execute ()
 Perform execution of this instance. More...
 
- Properties inherited from Ntp.Common.Process.JobDescription
IJobConfiguration Configuration [get]
 Gets the configuration for the job. More...
 
abstract string JobType [get]
 Gets the type of the job as text. More...
 
LogBase Log [get]
 Gets the log to use when registering events. More...
 
abstract int Priority [get]
 Gets the priority to use when scheduling jobs. More...
 
abstract ThreadType ThreadType [get]
 Gets a value indicating whether this JobDescription should run as a single thread. More...
 

Detailed Description

Definition at line 34 of file HostIoStatJob.cs.

Constructor & Destructor Documentation

Ntp.Analyzer.Process.Description.HostIoStatJob.HostIoStatJob ( StatConfiguration  config,
LogBase  log 
)
inline

Definition at line 36 of file HostIoStatJob.cs.

37  : base(config, log)
38  {
39  this.config = config;
40  }

Member Function Documentation

override void Ntp.Analyzer.Process.Description.HostIoStatJob.InternalExecute ( )
inlineprotectedvirtual

Implementing method for descendants.

Implements Ntp.Common.Process.JobDescription.

Definition at line 50 of file HostIoStatJob.cs.

References b, Ntp.Analyzer.Import.ImportFactory.CreateIoImporter(), e, Ntp.Analyzer.Import.Importer< T >.Execute(), Ntp.Analyzer.Data.DataFace.HostIoReadings, Ntp.Analyzer.Data.DataFace.Hosts, Ntp.Analyzer.Data.DataFace.Instance, and Ntp.Analyzer.Data.DataFace.ReadingBulks.

51  {
52  if (config.ServerType == ServerType.Ntpctl)
53  {
54  Log.OpenNtpConfigError();
55  return;
56  }
57 
58  var host = DataFace.Instance.Hosts.SingleOrDefault(h => h.Id == config.HostId);
59  if (host == null)
60  {
61  Log.HostNotFound(config.HostId);
62  return;
63  }
64 
65  var bulk = config.Bulk == null
66  ? new ReadingBulk(host.Name, config.TimeStamp)
67  : DataFace.Instance.ReadingBulks.Single(b => b.Name == config.Bulk.Name);
68 
70 
71  try
72  {
73  importer.Execute();
74  }
75  catch (Exception e)
76  {
77  Log.HostImportError(e);
78  return;
79  }
80 
81  foreach (var entry in importer)
82  {
83  var reading = new HostIoReading(host, entry, bulk);
84  DataFace.Instance.HostIoReadings.Save(reading);
85  }
86  }
string ServerName
Gets the name of the server in the HostSubConfiguration.
HostDatabaseMapper Hosts
Gets the host mapper.
Definition: DataFace.cs:57
LogBase Log
Gets the log to use when registering events.
int HostId
Gets the host identifier in the HostSubConfiguration.
var e
Definition: bootstrap.min.js:6
static Importer< IoStatsEntry > CreateIoImporter(string address, ServerType type, LogBase log)
Singleton facade class used to access memory persistent data.
Definition: DataFace.cs:30
static DataFace Instance
Gets the Singleton instance.
Definition: DataFace.cs:51
ServerType ServerType
Gets the type of the server in the HostSubConfiguration.
var b
Definition: bootstrap.min.js:6
HostIoReadingDatabaseMapper HostIoReadings
Gets the host IO reading mapper.
Definition: DataFace.cs:81

Here is the call graph for this function:

Member Data Documentation

readonly StatConfiguration Ntp.Analyzer.Process.Description.HostIoStatJob.config
private

Definition at line 42 of file HostIoStatJob.cs.

override string Ntp.Analyzer.Process.Description.HostIoStatJob.JobType => "Host IO statistics"

Definition at line 46 of file HostIoStatJob.cs.

override int Ntp.Analyzer.Process.Description.HostIoStatJob.Priority => 2

Definition at line 48 of file HostIoStatJob.cs.

override ThreadType Ntp.Analyzer.Process.Description.HostIoStatJob.ThreadType => ThreadType.MultiThreaded

Definition at line 44 of file HostIoStatJob.cs.


The documentation for this class was generated from the following file: