A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
massive cleanups in the storage world.
[simgrid.git]
/
examples
/
s4u
/
io
/
s4u_io.cpp
diff --git
a/examples/s4u/io/s4u_io.cpp
b/examples/s4u/io/s4u_io.cpp
index
90126b6
..
d9cd197
100644
(file)
--- a/
examples/s4u/io/s4u_io.cpp
+++ b/
examples/s4u/io/s4u_io.cpp
@@
-11,27
+11,27
@@
XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_test, "a sample log category");
class MyHost {
public:
class MyHost {
public:
-
-
void show_info(boost::unordered_map <std::string, simgrid::s4u::Storage*> const&mounts)
{
+ void show_info(std::unordered_map<std::string, simgrid::s4u::Storage*> const& mounts)
+ {
XBT_INFO("Storage info on %s:", simgrid::s4u::Host::current()->cname());
for (const auto&kv : mounts) {
const char* mountpoint = kv.first.c_str();
XBT_INFO("Storage info on %s:", simgrid::s4u::Host::current()->cname());
for (const auto&kv : mounts) {
const char* mountpoint = kv.first.c_str();
- simgrid::s4u::Storage
storage = *
kv.second;
+ simgrid::s4u::Storage
* storage =
kv.second;
// Retrieve disk's information
// Retrieve disk's information
- sg_size_t free_size = storage
.
sizeFree();
- sg_size_t used_size = storage
.
sizeUsed();
- sg_size_t size
= storage.
size();
+ sg_size_t free_size = storage
->
sizeFree();
+ sg_size_t used_size = storage
->
sizeUsed();
+ sg_size_t size
= storage->
size();
- XBT_INFO(" %s (%s) Used: %llu; Free: %llu; Total: %llu.",
-
storage.name(), mountpoint, used_size, free_size,
size);
+ XBT_INFO(" %s (%s) Used: %llu; Free: %llu; Total: %llu.",
storage->name(), mountpoint, used_size, free_size,
+
size);
}
}
void operator()() {
}
}
void operator()() {
-
boost::unordered_map <std::string, simgrid::s4u::Storage
*> const& mounts =
- simgrid::s4u::Host::current()->mountedStorages();
+
std::unordered_map<std::string, simgrid::s4u::Storage
*> const& mounts =
+
simgrid::s4u::Host::current()->mountedStorages();
show_info(mounts);
show_info(mounts);