timemory 3.3.0
Modular C++ Toolkit for Performance Analysis and Logging. Profiling API and Tools for C, C++, CUDA, Fortran, and Python. The C++ template API is essentially a framework to creating tools: it is designed to provide a unifying interface for recording various performance measurements alongside data logging and interfaces to other tools.
components.hpp
Go to the documentation of this file.
1// MIT License
2//
3// Copyright (c) 2020, The Regents of the University of California,
4// through Lawrence Berkeley National Laboratory (subject to receipt of any
5// required approvals from the U.S. Dept. of Energy). All rights reserved.
6//
7// Permission is hereby granted, free of charge, to any person obtaining a copy
8// of this software and associated documentation files (the "Software"), to deal
9// in the Software without restriction, including without limitation the rights
10// to use, copy, modify, merge, publish, distribute, sublicense, and
11// copies of the Software, and to permit persons to whom the Software is
12// furnished to do so, subject to the following conditions:
13//
14// The above copyright notice and this permission notice shall be included in all
15// copies or substantial portions of the Software.
16//
17// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23// SOFTWARE.
24
25#pragma once
26
28#include "timemory/components/rusage/backends.hpp"
30#include "timemory/components/timing/backends.hpp"
32#include "timemory/units.hpp"
33
34namespace tim
35{
36namespace component
37{
38//--------------------------------------------------------------------------------------//
39//
40// Resource Usage types
41//
42//--------------------------------------------------------------------------------------//
43/// \struct tim::component::peak_rss
44/// \brief
45/// this struct extracts the high-water mark (or a change in the high-water mark) of
46/// the resident set size (RSS). Which is current amount of memory in RAM.
47/// When used on a system with swap enabled, this value may fluctuate but should not
48/// on an HPC system.
49//
50struct peak_rss : public base<peak_rss>
51{
52 static std::string label() { return "peak_rss"; }
54 {
55 return "Measures changes in the high-water mark for the amount of memory "
56 "allocated in RAM. May fluctuate if swap is enabled";
57 }
58 static value_type record() { return get_peak_rss(); }
59 double get() const
60 {
61 auto val = base_type::load();
62 return val / static_cast<double>(base_type::get_unit());
63 }
64 double get_display() const { return get(); }
65
66 void start() { value = record(); }
67 void stop()
68 {
69 value = (record() - value);
70 accum += value;
71 }
72
73 /// sample a measurement
74 void sample() { accum = value = std::max<int64_t>(value, record()); }
75
76 /// sample a measurement from cached data
77 void sample(const cache_type& _cache)
78 {
79 accum = value = std::max<int64_t>(value, record(_cache));
80 }
81
82 /// read the value from cached data
83 static value_type record(const cache_type& _cache) { return _cache.get_peak_rss(); }
84
85 /// start a measurement using the cached data
86 void start(const cache_type& _cache) { value = record(_cache); }
87
88 /// stop a measurement using the cached data
89 void stop(const cache_type& _cache)
90 {
91 auto tmp = record(_cache);
92 auto delta = tmp - value;
93 accum = std::max(static_cast<const value_type&>(accum), delta);
94 value = tmp;
95 }
96};
97
98//--------------------------------------------------------------------------------------//
99/// \struct tim::component::page_rss
100/// \brief
101/// this struct measures the resident set size (RSS) currently allocated in pages of
102/// memory. Unlike the peak_rss, this value will fluctuate as memory gets freed and
103/// allocated
104//
105struct page_rss : public base<page_rss, int64_t>
106{
107 using value_type = int64_t;
108 using result_type = double;
111
112 static std::string label() { return "page_rss"; }
114 {
115 return "Amount of memory allocated in pages of memory. Unlike peak_rss, value "
116 "will fluctuate as memory is freed/allocated";
117 }
118 static value_type record() { return get_page_rss(); }
119 double get() const
120 {
121 auto val = base_type::load();
122 return val / static_cast<double>(base_type::get_unit());
123 }
124 double get_display() const { return get(); }
125 void start() { value = record(); }
126 void stop()
127 {
128 value = (record() - value);
129 accum += value;
130 }
131 void sample() { accum = value = std::max<int64_t>(value, record()); }
132};
133
134//--------------------------------------------------------------------------------------//
135/// \struct tim::component::num_io_in
136/// \brief
137/// the number of times the file system had to perform input.
138//
139struct num_io_in : public base<num_io_in>
140{
141 using value_type = int64_t;
143
144 static const short precision = 0;
145 static const short width = 3;
146 static const std::ios_base::fmtflags format_flags = {};
147
148 static std::string label() { return "io_in"; }
150 {
151 return "Number of times the filesystem had to perform input";
152 }
153 static value_type record() { return get_num_io_in(); }
155 {
156 auto val = base_type::load();
157 return val;
158 }
159 value_type get_display() const { return get(); }
160 void start() { value = record(); }
161 void stop()
162 {
163 value = (record() - value);
164 accum += value;
165 }
166
167 static value_type record(const cache_type& _cache) { return _cache.get_num_io_in(); }
168
169 void start(const cache_type& _cache) { value = record(_cache); }
170
171 void stop(const cache_type& _cache)
172 {
173 auto tmp = record(_cache);
174 accum += (tmp - value);
175 value = tmp;
176 }
177};
178
179//--------------------------------------------------------------------------------------//
180/// \struct tim::component::num_io_out
181/// \brief
182/// the number of times the file system had to perform output.
183//
184struct num_io_out : public base<num_io_out>
185{
186 using value_type = int64_t;
188
189 static const short precision = 0;
190 static const short width = 3;
191 static const std::ios_base::fmtflags format_flags = {};
192
193 static std::string label() { return "io_out"; }
195 {
196 return "Number of times the filesystem had to perform output";
197 }
198 static value_type record() { return get_num_io_out(); }
200 {
201 auto val = base_type::load();
202 return val;
203 }
204 value_type get_display() const { return get(); }
205 void start() { value = record(); }
206 void stop()
207 {
208 value = (record() - value);
209 accum += value;
210 }
211
212 static value_type record(const cache_type& _cache) { return _cache.get_num_io_out(); }
213
214 void start(const cache_type& _cache) { value = record(_cache); }
215
216 void stop(const cache_type& _cache)
217 {
218 auto tmp = record(_cache);
219 accum += (tmp - value);
220 value = tmp;
221 }
222};
223
224//--------------------------------------------------------------------------------------//
225/// \struct tim::component::num_minor_page_faults
226/// \brief
227/// the number of page faults serviced without any I/O activity; here I/O activity is
228/// avoided by reclaiming a page frame from the list of pages awaiting reallocation.
229//
230struct num_minor_page_faults : public base<num_minor_page_faults>
231{
232 using value_type = int64_t;
234
235 static const short precision = 0;
236 static const short width = 3;
237 static const std::ios_base::fmtflags format_flags = {};
238
239 static std::string label() { return "minor_page_flts"; }
241 {
242 return "Number of page faults serviced without any I/O activity via 'reclaiming' "
243 "a page frame from the list of pages awaiting reallocation";
244 }
245 static value_type record() { return get_num_minor_page_faults(); }
247 {
248 auto val = base_type::load();
249 return val;
250 }
251 value_type get_display() const { return get(); }
252 void start() { value = record(); }
253 void stop()
254 {
255 value = (record() - value);
256 accum += value;
257 }
258
259 static value_type record(const cache_type& _cache)
260 {
261 return _cache.get_num_minor_page_faults();
262 }
263
264 void start(const cache_type& _cache) { value = record(_cache); }
265
266 void stop(const cache_type& _cache)
267 {
268 auto tmp = record(_cache);
269 accum += (tmp - value);
270 value = tmp;
271 }
272};
273
274//--------------------------------------------------------------------------------------//
275/// \struct tim::component::num_major_page_faults
276/// \brief
277/// the number of page faults serviced that required I/O activity.
278//
279struct num_major_page_faults : public base<num_major_page_faults>
280{
281 using value_type = int64_t;
283
284 static const short precision = 0;
285 static const short width = 3;
286 static const std::ios_base::fmtflags format_flags = {};
287
288 static std::string label() { return "major_page_flts"; }
290 {
291 return "Number of page faults serviced that required I/O activity";
292 }
293 static value_type record() { return get_num_major_page_faults(); }
295 {
296 auto val = base_type::load();
297 return val;
298 }
299 value_type get_display() const { return get(); }
300 void start() { value = record(); }
301 void stop()
302 {
303 value = (record() - value);
304 accum += value;
305 }
306
307 static value_type record(const cache_type& _cache)
308 {
309 return _cache.get_num_major_page_faults();
310 }
311
312 void start(const cache_type& _cache) { value = record(_cache); }
313
314 void stop(const cache_type& _cache)
315 {
316 auto tmp = record(_cache);
317 accum += (tmp - value);
318 value = tmp;
319 }
320};
321
322//--------------------------------------------------------------------------------------//
323/// \struct tim::component::voluntary_context_switch
324/// \brief
325/// the number of times a context switch resulted due to a process voluntarily giving up
326/// the processor before its time slice was completed (usually to await availability of a
327/// resource).
328//
329struct voluntary_context_switch : public base<voluntary_context_switch>
330{
331 using value_type = int64_t;
333
334 static const short precision = 0;
335 static const short width = 3;
336 static const std::ios_base::fmtflags format_flags = {};
337
338 static std::string label() { return "vol_cxt_swch"; }
340 {
341 return "Number of context switches due to a process voluntarily giving up the "
342 "processor before its time slice was completed";
343 }
344 static value_type record() { return get_num_voluntary_context_switch(); }
346 {
347 auto val = base_type::load();
348 return val;
349 }
350 value_type get() const { return get_display(); }
351 void start() { value = record(); }
352 void stop()
353 {
354 value = (record() - value);
355 accum += value;
356 }
357
358 static value_type record(const cache_type& _cache)
359 {
360 return _cache.get_num_voluntary_context_switch();
361 }
362
363 void start(const cache_type& _cache) { value = record(_cache); }
364
365 void stop(const cache_type& _cache)
366 {
367 auto tmp = record(_cache);
368 accum += (tmp - value);
369 value = tmp;
370 }
371};
372
374
375//--------------------------------------------------------------------------------------//
376/// \struct tim::component::priority_context_switch
377/// \brief
378/// the number of times a context switch resulted due to a higher priority process
379/// becoming runnable or because the current process exceeded its time slice
380//
381struct priority_context_switch : public base<priority_context_switch>
382{
383 using value_type = int64_t;
385
386 static const short precision = 0;
387 static const short width = 3;
388 static const std::ios_base::fmtflags format_flags = {};
389
390 static std::string label() { return "prio_cxt_swch"; }
392 {
393 return "Number of context switch due to higher priority process becoming runnable"
394 " or because the current process exceeded its time slice";
395 }
396 static value_type record() { return get_num_priority_context_switch(); }
398 {
399 auto val = base_type::load();
400 return val;
401 }
402 value_type get() const { return get_display(); }
403 void start() { value = record(); }
404 void stop()
405 {
406 value = (record() - value);
407 accum += value;
408 }
409
410 static value_type record(const cache_type& _cache)
411 {
412 return _cache.get_num_priority_context_switch();
413 }
414
415 void start(const cache_type& _cache) { value = record(_cache); }
416
417 void stop(const cache_type& _cache)
418 {
419 auto tmp = record(_cache);
420 accum += (tmp - value);
421 value = tmp;
422 }
423};
424
426
427//--------------------------------------------------------------------------------------//
428/// \struct tim::component::virtual_memory
429/// \brief
430/// this struct extracts the virtual memory usage
431//
432struct virtual_memory : public base<virtual_memory>
433{
434 using value_type = int64_t;
436
437 static std::string label() { return "virtual_memory"; }
438 static std::string description() { return "Records the change in virtual memory"; }
439 static value_type record() { return get_virt_mem(); }
440 double get() const
441 {
442 auto val = base_type::load();
443 return val / static_cast<double>(base_type::get_unit());
444 }
445 double get_display() const { return get(); }
446 void start() { value = record(); }
447 void stop()
448 {
449 value = (record() - value);
450 accum += value;
451 }
452 void sample() { accum = value = std::max<int64_t>(value, record()); }
453};
454
455//--------------------------------------------------------------------------------------//
456/// \struct tim::component::user_mode_time
457/// \brief This is the total amount of time spent executing in user mode
458//
459struct user_mode_time : public base<user_mode_time, int64_t>
460{
461 using ratio_t = std::micro;
462 using value_type = int64_t;
465
466 static std::string label() { return "user_mode"; }
468 {
469 return "CPU time spent executing in user mode (via rusage)";
470 }
471 static value_type record() { return get_user_mode_time(); }
472
473 double get_display() const { return get(); }
474 double get() const { return load() / static_cast<double>(base_type::get_unit()); }
475
476 void start() { value = record(); }
477
478 void stop()
479 {
480 auto tmp = record();
481 if(tmp > value)
482 {
483 value = (tmp - value);
484 accum += value;
485 }
486 }
487
488 static value_type record(const cache_type& _cache)
489 {
490 return _cache.get_user_mode_time();
491 }
492
493 void start(const cache_type& _cache) { value = record(_cache); }
494
495 void stop(const cache_type& _cache)
496 {
497 auto tmp = record(_cache);
498 if(tmp > value)
499 {
500 accum += (tmp - value);
501 value = tmp;
502 }
503 }
504};
505
506//--------------------------------------------------------------------------------------//
507/// \struct tim::component::kernel_mode_time
508/// \brief This is the total amount of time spent executing in kernel mode
509//
510struct kernel_mode_time : public base<kernel_mode_time, int64_t>
511{
512 using ratio_t = std::micro;
513 using value_type = int64_t;
516
517 static std::string label() { return "kernel_mode"; }
519 {
520 return "CPU time spent executing in kernel mode (via rusage)";
521 }
522 static value_type record() { return get_kernel_mode_time(); }
523
524 double get_display() const { return get(); }
525 double get() const { return load() / static_cast<double>(base_type::get_unit()); }
526
527 void start() { value = record(); }
528
529 void stop()
530 {
531 auto tmp = record();
532 if(tmp > value)
533 {
534 value = (tmp - value);
535 accum += value;
536 }
537 }
538
539 static value_type record(const cache_type& _cache)
540 {
541 return _cache.get_kernel_mode_time();
542 }
543
544 void start(const cache_type& _cache) { value = record(_cache); }
545
546 void stop(const cache_type& _cache)
547 {
548 auto tmp = record(_cache);
549 if(tmp > value)
550 {
551 accum += (tmp - value);
552 value = tmp;
553 }
554 }
555};
556
557//--------------------------------------------------------------------------------------//
558/// \struct tim::component::current_peak_rss
559/// \brief
560/// this struct extracts the absolute value of high-water mark of the resident set size
561/// (RSS) at start and stop points. RSS is current amount of memory in RAM.
562//
563struct current_peak_rss : public base<current_peak_rss, std::pair<int64_t, int64_t>>
564{
565 using unit_type = std::pair<int64_t, int64_t>;
566 using display_unit_type = std::pair<std::string, std::string>;
567 using result_type = std::pair<double, double>;
569
570 static std::string label() { return "current_peak_rss"; }
572 {
573 return "Absolute value of high-water mark of memory allocation in RAM";
574 }
575
576 static value_type record() { return value_type{ get_peak_rss(), 0 }; }
577
578 void start() { value = record(); }
579
580 void stop()
581 {
582 using namespace tim::component::operators;
583 value = value_type{ value.first, record().first };
584 accum = std::max(accum, value);
585 }
586
587 static value_type record(const cache_type& _cache)
588 {
589 return value_type{ _cache.get_peak_rss(), 0 };
590 }
591
592 void start(const cache_type& _cache) { value = record(_cache); }
593
594 void stop(const cache_type& _cache)
595 {
596 value = value_type{ value.first, record(_cache).first };
597 accum = std::max(accum, value);
598 }
599
600public:
602 {
603 std::stringstream ss;
604 std::stringstream ssv;
605 std::stringstream ssr;
606 auto _prec = base_type::get_precision();
607 auto _width = base_type::get_width();
608 auto _flags = base_type::get_format_flags();
609 auto _disp = get_display_unit();
610
611 auto _val = get();
612
613 ssv.setf(_flags);
614 ssv << std::setw(_width) << std::setprecision(_prec) << std::get<0>(_val);
615 if(!std::get<0>(_disp).empty())
616 ssv << " " << std::get<0>(_disp);
617
618 ssr.setf(_flags);
619 ssr << std::setw(_width) << std::setprecision(_prec) << std::get<1>(_val);
620 if(!std::get<1>(_disp).empty())
621 ssr << " " << std::get<1>(_disp);
622
623 ss << ssv.str() << ", " << ssr.str();
624 return ss.str();
625 }
626
628 {
630 data.first /= get_unit().first;
631 data.second /= get_unit().second;
632 return data;
633 }
634
635 static std::pair<double, double> unit()
636 {
637 return std::pair<double, double>{ units::megabyte, units::megabyte };
638 }
639
640 static std::vector<std::string> display_unit_array()
641 {
642 return std::vector<std::string>{ get_display_unit().first,
643 get_display_unit().second };
644 }
645
646 static std::vector<std::string> label_array()
647 {
648 return std::vector<std::string>{ "start peak rss", " stop peak rss" };
649 }
650
651 static display_unit_type display_unit() { return display_unit_type{ "MB", "MB" }; }
652
653 static std::pair<double, double> unit_array() { return unit(); }
654
655 static std::vector<std::string> description_array()
656 {
657 return std::vector<std::string>{ "Resident set size at start",
658 "Resident set size at stop" };
659 }
660
662 {
663 static auto _instance = this_type::unit();
664 static auto& _mem = _instance;
665
666 if(settings::memory_units().length() > 0)
667 {
668 _mem.first = std::get<1>(units::get_memory_unit(settings::memory_units()));
669 _mem.second = std::get<1>(units::get_memory_unit(settings::memory_units()));
670 }
671
672 return _mem;
673 }
674
676 {
677 static display_unit_type _instance = this_type::display_unit();
678 static auto& _mem = _instance;
679
680 if(settings::memory_units().length() > 0)
681 {
682 _mem.first = std::get<0>(units::get_memory_unit(settings::memory_units()));
683 _mem.second = std::get<0>(units::get_memory_unit(settings::memory_units()));
684 }
685
686 return _mem;
687 }
688};
689
690//--------------------------------------------------------------------------------------//
691} // namespace component
692} // namespace tim
693//
694//======================================================================================//
::tim::statistics< Tp > max(::tim::statistics< Tp > lhs, const Tp &rhs)
Definition: statistics.hpp:320
void load(Archive &ar, tim::node::graph< Tp > &d)
Definition: node.hpp:520
std::tuple< std::string, int64_t > get_memory_unit(std::string _unit)
Definition: units.hpp:188
Definition: kokkosp.cpp:39
memory_units
Definition: settings.cpp:1657
tim::mpl::apply< std::string > string
Definition: macros.hpp:53
decltype(auto) load()
static int64_t get_unit()
typename trait::cache< peak_rss >::type cache_type
this struct extracts the absolute value of high-water mark of the resident set size (RSS) at start an...
Definition: components.hpp:564
std::pair< int64_t, int64_t > unit_type
Definition: components.hpp:565
static std::vector< std::string > label_array()
Definition: components.hpp:646
static display_unit_type get_display_unit()
Definition: components.hpp:675
void stop(const cache_type &_cache)
Definition: components.hpp:594
static std::pair< double, double > unit_array()
Definition: components.hpp:653
std::pair< std::string, std::string > display_unit_type
Definition: components.hpp:566
std::string get_display() const
Definition: components.hpp:601
std::pair< double, double > result_type
Definition: components.hpp:567
void start(const cache_type &_cache)
Definition: components.hpp:592
static display_unit_type display_unit()
Definition: components.hpp:651
static std::vector< std::string > description_array()
Definition: components.hpp:655
static std::string label()
Definition: components.hpp:570
static value_type record(const cache_type &_cache)
Definition: components.hpp:587
static std::pair< double, double > unit()
Definition: components.hpp:635
static std::string description()
Definition: components.hpp:571
static std::vector< std::string > display_unit_array()
Definition: components.hpp:640
This is the total amount of time spent executing in kernel mode.
Definition: components.hpp:511
static value_type record(const cache_type &_cache)
Definition: components.hpp:539
void start(const cache_type &_cache)
Definition: components.hpp:544
static std::string description()
Definition: components.hpp:518
void stop(const cache_type &_cache)
Definition: components.hpp:546
static std::string label()
Definition: components.hpp:517
the number of times the file system had to perform input.
Definition: components.hpp:140
static value_type record(const cache_type &_cache)
Definition: components.hpp:167
static std::string label()
Definition: components.hpp:148
static const std::ios_base::fmtflags format_flags
Definition: components.hpp:146
value_type get_display() const
Definition: components.hpp:159
void stop(const cache_type &_cache)
Definition: components.hpp:171
static const short width
Definition: components.hpp:145
void start(const cache_type &_cache)
Definition: components.hpp:169
static value_type record()
Definition: components.hpp:153
static const short precision
Definition: components.hpp:144
static std::string description()
Definition: components.hpp:149
value_type get() const
Definition: components.hpp:154
the number of times the file system had to perform output.
Definition: components.hpp:185
static value_type record(const cache_type &_cache)
Definition: components.hpp:212
void stop(const cache_type &_cache)
Definition: components.hpp:216
value_type get_display() const
Definition: components.hpp:204
static std::string label()
Definition: components.hpp:193
static std::string description()
Definition: components.hpp:194
void start(const cache_type &_cache)
Definition: components.hpp:214
static const std::ios_base::fmtflags format_flags
Definition: components.hpp:191
static const short precision
Definition: components.hpp:189
static value_type record()
Definition: components.hpp:198
static const short width
Definition: components.hpp:190
value_type get() const
Definition: components.hpp:199
the number of page faults serviced that required I/O activity.
Definition: components.hpp:280
void start(const cache_type &_cache)
Definition: components.hpp:312
void stop(const cache_type &_cache)
Definition: components.hpp:314
static const std::ios_base::fmtflags format_flags
Definition: components.hpp:286
static value_type record(const cache_type &_cache)
Definition: components.hpp:307
the number of page faults serviced without any I/O activity; here I/O activity is avoided by reclaimi...
Definition: components.hpp:231
static const std::ios_base::fmtflags format_flags
Definition: components.hpp:237
void stop(const cache_type &_cache)
Definition: components.hpp:266
static value_type record(const cache_type &_cache)
Definition: components.hpp:259
void start(const cache_type &_cache)
Definition: components.hpp:264
this struct measures the resident set size (RSS) currently allocated in pages of memory....
Definition: components.hpp:106
static std::string label()
Definition: components.hpp:112
double get_display() const
Definition: components.hpp:124
static std::string description()
Definition: components.hpp:113
static value_type record()
Definition: components.hpp:118
this struct extracts the high-water mark (or a change in the high-water mark) of the resident set siz...
Definition: components.hpp:51
static value_type record(const cache_type &_cache)
read the value from cached data
Definition: components.hpp:83
double get_display() const
Definition: components.hpp:64
void stop(const cache_type &_cache)
stop a measurement using the cached data
Definition: components.hpp:89
static std::string label()
Definition: components.hpp:52
void start(const cache_type &_cache)
start a measurement using the cached data
Definition: components.hpp:86
void sample()
sample a measurement
Definition: components.hpp:74
static value_type record()
Definition: components.hpp:58
static std::string description()
Definition: components.hpp:53
void sample(const cache_type &_cache)
sample a measurement from cached data
Definition: components.hpp:77
the number of times a context switch resulted due to a higher priority process becoming runnable or b...
Definition: components.hpp:382
static value_type record(const cache_type &_cache)
Definition: components.hpp:410
void start(const cache_type &_cache)
Definition: components.hpp:415
static const std::ios_base::fmtflags format_flags
Definition: components.hpp:388
void stop(const cache_type &_cache)
Definition: components.hpp:417
This is the total amount of time spent executing in user mode.
Definition: components.hpp:460
static value_type record(const cache_type &_cache)
Definition: components.hpp:488
void start(const cache_type &_cache)
Definition: components.hpp:493
void stop(const cache_type &_cache)
Definition: components.hpp:495
static value_type record()
Definition: components.hpp:471
static std::string label()
Definition: components.hpp:466
static std::string description()
Definition: components.hpp:467
this struct extracts the virtual memory usage
Definition: components.hpp:433
static std::string label()
Definition: components.hpp:437
static value_type record()
Definition: components.hpp:439
static std::string description()
Definition: components.hpp:438
the number of times a context switch resulted due to a process voluntarily giving up the processor be...
Definition: components.hpp:330
void start(const cache_type &_cache)
Definition: components.hpp:363
static value_type record(const cache_type &_cache)
Definition: components.hpp:358
void stop(const cache_type &_cache)
Definition: components.hpp:365
static const std::ios_base::fmtflags format_flags
Definition: components.hpp:336