Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
g
i
l
m
n
o
p
r
s
t
v
w
Functions
_
a
c
d
g
m
n
o
r
s
t
Variables
Typedefs
Enumerations
Enumerator
Classes
Class List
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
z
~
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
z
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Typedefs
c
d
e
f
g
h
m
n
q
s
Enumerations
Enumerator
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
w
Related Functions
Files
File List
File Members
All
_
b
c
d
e
l
m
o
s
v
Functions
b
d
l
m
o
Variables
Typedefs
Macros
_
b
c
d
e
l
s
v
tests
test-mt.cpp
Go to the documentation of this file.
1
/* Copyright 2019, LAAS-CNRS
2
*
3
* Olivier Stasse
4
*
5
*/
6
#include <unistd.h>
7
8
#include <
dynamic-graph/process-list.hh
>
9
#include <fstream>
10
#include <iostream>
11
#include <sstream>
12
13
#define BOOST_TEST_MODULE debug - trace
14
15
#if BOOST_VERSION >= 105900
16
#include <boost/test/tools/output_test_stream.hpp>
17
#else
18
#include <boost/test/output_test_stream.hpp>
19
#endif
20
#include <boost/test/unit_test.hpp>
21
22
using
boost::test_tools::output_test_stream;
23
24
BOOST_AUTO_TEST_CASE
(testMt) {
25
dynamicgraph::CPU::System
aSystem;
26
27
// create and open a character archive for output
28
std::ofstream ofs(
"cpu_state.dat"
);
29
boost::archive::text_oarchive oa(ofs);
30
oa << aSystem;
31
32
for
(
unsigned
int
i = 0; i < 10; i++) {
33
usleep(100000);
34
aSystem.readProcStat();
35
}
36
}
dynamicgraph::CPU::System
Definition:
process-list.hh:128
process-list.hh
BOOST_AUTO_TEST_CASE
BOOST_AUTO_TEST_CASE(testMt)
Definition:
test-mt.cpp:24
dynamic-graph
Author(s): Nicolas Mansard, Olivier Stasse
autogenerated on Fri Aug 2 2024 08:36:38