X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d79578eb4d1e1336da580baa30edbbee18121e7f..ee1477d33506867034463d4d790279340382d7cc:/examples/cpp/io-degradation/s4u-io-degradation.cpp diff --git a/examples/cpp/io-degradation/s4u-io-degradation.cpp b/examples/cpp/io-degradation/s4u-io-degradation.cpp index 384b709a70..f2c3e1853c 100644 --- a/examples/cpp/io-degradation/s4u-io-degradation.cpp +++ b/examples/cpp/io-degradation/s4u-io-degradation.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2017-2021. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2017-2022. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -16,9 +16,8 @@ #include -namespace sg4 = simgrid::s4u; - XBT_LOG_NEW_DEFAULT_CATEGORY(disk_test, "Messages specific for this simulation"); +namespace sg4 = simgrid::s4u; /** @brief Calculates the bandwidth for disk doing async operations */ static void estimate_bw(const sg4::Disk* disk, int n_flows, bool read) @@ -49,7 +48,7 @@ static void host() { /* - Estimating bw for each disk and considering concurrent flows */ for (int n = 1; n < 15; n += 2) { - for (auto* disk : sg4::Host::current()->get_disks()) { + for (const auto* disk : sg4::Host::current()->get_disks()) { estimate_bw(disk, n, true); estimate_bw(disk, n, false); } @@ -105,7 +104,7 @@ static double ssd_dynamic_sharing(const sg4::Disk* /*disk*/, const std::string& * @param capacity Resource current capacity in SimGrid * @param n Number of activities sharing this resource */ -static double sata_dynamic_sharing(const sg4::Disk* /*disk*/, double capacity, int n) +static double sata_dynamic_sharing(const sg4::Disk* /*disk*/, double /*capacity*/, int n) { return 68.3 - 1.7 * n; } @@ -143,10 +142,10 @@ int main(int argc, char** argv) create_sata_disk(bob, "Griffon (SATA II)"); zone->seal(); - simgrid::s4u::Actor::create("", bob, host); + sg4::Actor::create("", bob, host); e.run(); - XBT_INFO("Simulated time: %g", simgrid::s4u::Engine::get_clock()); + XBT_INFO("Simulated time: %g", sg4::Engine::get_clock()); return 0; }