Stores memory sampling info, exists once as a static global object. More...
#include <memory_sampler.h>
Collaboration diagram for syten::MemorySampler:Public Member Functions | |
| void | start (std::string const &file_name) |
Starts the worker, writing output to file file_name More... | |
| void | stop () |
| Stops the worker. More... | |
| ~MemorySampler () | |
| Destructor, stops the worker and join()s it. More... | |
Public Attributes | |
| bool | keep_on {true} |
| Boolean to turn off the worker. More... | |
| std::mutex | mtx |
| Mutex protecting access to keep_on. More... | |
| std::thread | worker |
| Worker thread doing the sampling until keep_on is false. More... | |
Stores memory sampling info, exists once as a static global object.