summaryrefslogtreecommitdiff
path: root/src/libnml/cms/cmsdiag.hh
blob: 6f6fb78bcd2a385fa7011e2590fa7ae579d0373d (plain)
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/********************************************************************
* Description: cmsdiag.hh
*
*   Derived from a work by Fred Proctor & Will Shackleford
*
* Author:
* License: LGPL Version 2
* System: Linux
*    
* Copyright (c) 2004 All rights reserved.
*
* Last change: 
********************************************************************/

#ifndef CMSDIAG_HH
#define CMSDIAG_HH

#include "cms.hh"
class LinkedList;

class CMS_DIAG_STATIC_PROC_INFO {
  public:
    char name[16];		// process name
    char host_sysinfo[32];
    long pid;			/* Process, Thread or Task Id. */
    double rcslib_ver;		/* Version of the rcslib used by this
				   component. */
};

class CMS_DIAG_PROC_INFO:public CMS_DIAG_STATIC_PROC_INFO {
  public:
    CMS_INTERNAL_ACCESS_TYPE access_type;	/* access type of last
						   operation */
    long msg_id;		/* id of the message written or at time of
				   read. */
    long msg_size;		/* size of the message written or at time of
				   read. */
    long msg_type;		/* id of the message written or at time of
				   read. */
    long number_of_accesses;
    long number_of_new_messages;
    double bytes_moved;
    double bytes_moved_across_socket;
    double last_access_time;
    double first_access_time;
    double max_difference;
    double min_difference;
};

class CMS_DIAG_HEADER {
  public:
    virtual ~CMS_DIAG_HEADER() {}
    long last_writer;
    long last_reader;
};

class CMS_DIAGNOSTICS_INFO:public CMS_DIAG_HEADER {
  public:
    CMS_DIAGNOSTICS_INFO();
    virtual ~ CMS_DIAGNOSTICS_INFO();
    CMS_DIAG_PROC_INFO *last_writer_dpi;
    CMS_DIAG_PROC_INFO *last_reader_dpi;
    LinkedList *dpis;
};

extern double cmsdiag_timebias;
extern int cmsdiag_timebias_set;

#endif