summaryrefslogtreecommitdiffstats
path: root/pcp/PCPDynamicColumn.h
blob: 39f79358d4c9d15c39da663bb6c473f2ab6d7ad1 (plain) (blame)
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
#ifndef HEADER_PCPDynamicColumn
#define HEADER_PCPDynamicColumn

#include "CRT.h"
#include "DynamicColumn.h"
#include "Hashtable.h"
#include "Process.h"
#include "RichString.h"

#include "pcp/PCPProcess.h"


typedef struct PCPDynamicColumn_ {
   DynamicColumn super;
   char* metricName;
   size_t id;  /* identifier for metric array lookups */
} PCPDynamicColumn;

typedef struct PCPDynamicColumns_ {
   Hashtable* table;
   size_t count;  /* count of dynamic meters discovered by scan */
   size_t offset; /* start offset into the Platform metric array */
   size_t cursor; /* identifier allocator for each new metric used */
} PCPDynamicColumns;

void PCPDynamicColumns_init(PCPDynamicColumns* columns);

void PCPDynamicColumn_writeField(PCPDynamicColumn* this, const Process* proc, RichString* str);

int PCPDynamicColumn_compareByKey(const PCPProcess* p1, const PCPProcess* p2, ProcessField key);

#endif

© 2014-2024 Faster IT GmbH | imprint | privacy policy