81 #if defined (ACE_WIN32) 84 # ifdef ACE_HAS_GETTID 89 return String(buffer, len);
105 bit_key +=
" (" + name +
")";
110 "adding thread %C\n", bit_key.c_str()));
114 map_.insert(std::make_pair(thread_id,
Thread(bit_key)));
129 const Map::iterator pos =
map_.find(thread_id);
130 if (pos !=
map_.end()) {
149 const Map::iterator pos =
map_.find(thread_id);
150 if (pos !=
map_.end()) {
169 const Map::iterator pos =
map_.find(thread_id);
170 if (pos !=
map_.end()) {
173 list_.push_back(pos->second);
181 ThreadStatusManager::List& running,
182 ThreadStatusManager::List&
finished)
const 186 for (Map::const_iterator pos =
map_.begin(), limit =
map_.end(); pos != limit; ++pos) {
187 if (pos->second.last_update() > start) {
188 running.push_back(pos->second);
192 for (List::const_iterator pos =
list_.begin(), limit =
list_.end(); pos != limit; ++pos) {
193 if (pos->last_update() > start) {
194 finished.push_back(*pos);
203 while (!
list_.empty() &&
list_.front().last_update() < cutoff) {
void add_thread(const String &name)
#define ACE_GUARD(MUTEX, OBJ, LOCK)
ssize_t thr_id(char buffer[], size_t buffer_length)
Bucket bucket_[bucket_count]
String to_dds_string(unsigned short to_convert)
static const size_t bucket_count
MonotonicTimePoint last_update_
bool update_thread_status() const
const String & bit_key() const
void active(bool nested=false)
static ThreadId get_thread_id()
double utilization(const MonotonicTimePoint &now) const
static TimePoint_T< MonotonicClock > now()
void idle(bool nested=false)
static ACE_thread_t self(void)
void harvest(const MonotonicTimePoint &start, List &running, List &finished) const
TimeDuration thread_status_interval_
Thread(const String &bit_key)
static const TimeDuration zero_value
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
void cleanup(const MonotonicTimePoint &now)
void update(const MonotonicTimePoint &m_now, const SystemTimePoint &s_now, ThreadStatus next_status, const TimeDuration &bucket_limit, bool nested)
SystemTimePoint timestamp_
TimeDuration bucket_limit_
The Internal API and Implementation of OpenDDS.