15 #ifndef PSTATCOLLECTOR_H
16 #define PSTATCOLLECTOR_H
18 #include "pandabase.h"
20 #include "pStatThread.h"
21 #include "pStatClient.h"
56 INLINE PStatCollector();
59 INLINE PStatCollector(
const string &name,
61 INLINE PStatCollector(
const PStatCollector &parent,
64 INLINE PStatCollector(
const PStatCollector ©);
65 INLINE
void operator = (
const PStatCollector ©);
67 INLINE
bool is_valid()
const;
68 INLINE
string get_name()
const;
69 INLINE
string get_fullname()
const;
70 INLINE
void output(ostream &out)
const;
72 INLINE
bool is_active();
73 INLINE
bool is_started();
77 INLINE
void clear_level();
78 INLINE
void set_level(
double level);
79 INLINE
void add_level(
double increment);
80 INLINE
void sub_level(
double decrement);
81 INLINE
void add_level_now(
double increment);
82 INLINE
void sub_level_now(
double decrement);
83 INLINE
void flush_level();
84 INLINE
double get_level();
86 INLINE
void clear_thread_level();
87 INLINE
void set_thread_level(
double level);
88 INLINE
void add_thread_level(
double increment);
89 INLINE
void sub_thread_level(
double decrement);
90 INLINE
double get_thread_level();
95 INLINE
void start(
const PStatThread &thread,
double as_of);
97 INLINE
void stop(
const PStatThread &thread,
double as_of);
100 INLINE
void set_level(
const PStatThread &thread,
double level);
101 INLINE
void add_level(
const PStatThread &thread,
double increment);
102 INLINE
void sub_level(
const PStatThread &thread,
double decrement);
103 INLINE
double get_level(
const PStatThread &thread);
105 INLINE
int get_index()
const;
116 INLINE PStatCollector();
119 INLINE PStatCollector(
const string &name,
121 INLINE PStatCollector(
const PStatCollector &parent,
124 INLINE
bool is_active() {
return false; }
125 INLINE
bool is_started() {
return false; }
126 INLINE
void start() { }
127 INLINE
void stop() { }
129 INLINE
void clear_level() { }
130 INLINE
void set_level(
double) { }
131 INLINE
void add_level(
double) { }
132 INLINE
void sub_level(
double) { }
133 INLINE
void add_level_now(
double) { }
134 INLINE
void sub_level_now(
double) { }
135 INLINE
void flush_level() { }
136 INLINE
double get_level() {
return 0.0; }
138 INLINE
bool is_active(
const PStatThread &) {
return false; }
145 INLINE
void set_level(
const PStatThread &,
double) { }
146 INLINE
void add_level(
const PStatThread &,
double) { }
147 INLINE
void sub_level(
const PStatThread &,
double) { }
148 INLINE
double get_level(
const PStatThread &) {
return 0.0; }
150 INLINE
int get_index()
const {
return 0; }
155 #include "pStatCollector.I"
157 inline ostream &operator << (ostream &out,
const PStatCollector &pcol) {
A lightweight class that represents a single element that may be timed and/or counted via stats...
A lightweight class that represents a single thread of execution to PStats.
A thread; that is, a lightweight process.
Manages the communications to report statistics via a network connection to a remote PStatServer...