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
add gatherv test
[simgrid.git]
/
teshsuite
/
models
/
wifi_usage_decay
/
wifi_usage_decay.cpp
diff --git
a/teshsuite/models/wifi_usage_decay/wifi_usage_decay.cpp
b/teshsuite/models/wifi_usage_decay/wifi_usage_decay.cpp
index 9d63d35ffd6bd177a2baa7a02379d0bb95172fa1..04057bc58715255394f7723b0637145e47f3ff4c 100644
(file)
--- a/
teshsuite/models/wifi_usage_decay/wifi_usage_decay.cpp
+++ b/
teshsuite/models/wifi_usage_decay/wifi_usage_decay.cpp
@@
-1,4
+1,4
@@
-/* Copyright (c) 2019-202
2
. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2019-202
3
. 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. */
/* 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,7
+16,6
@@
void run_ping_test(const std::vector<std::pair<std::string,std::string>>& mboxes
/* We need a separate actor so that it can sleep after each test */
static void main_dispatcher()
{
/* We need a separate actor so that it can sleep after each test */
static void main_dispatcher()
{
-
const std::vector<std::pair<std::string, std::string>> flows = {
{"Station 1", "Station 2"},
{"Station 3", "Station 4"},
const std::vector<std::pair<std::string, std::string>> flows = {
{"Station 1", "Station 2"},
{"Station 3", "Station 4"},
@@
-50,8
+49,8
@@
static void main_dispatcher()
auto* l = (simgrid::kernel::resource::WifiLinkImpl*)simgrid::s4u::Link::by_name("AP1")->get_impl();
l->toggle_callback();
run_ping_test(flows, 100000);
auto* l = (simgrid::kernel::resource::WifiLinkImpl*)simgrid::s4u::Link::by_name("AP1")->get_impl();
l->toggle_callback();
run_ping_test(flows, 100000);
-
}
}
+
int main(int argc, char** argv)
{
simgrid::s4u::Engine engine(&argc, argv);
int main(int argc, char** argv)
{
simgrid::s4u::Engine engine(&argc, argv);
@@
-65,7
+64,7
@@
int main(int argc, char** argv)
void run_ping_test(const std::vector<std::pair<std::string,std::string>>& mboxes, int data_size)
{
auto* mailbox = simgrid::s4u::Mailbox::by_name("Test");
void run_ping_test(const std::vector<std::pair<std::string,std::string>>& mboxes, int data_size)
{
auto* mailbox = simgrid::s4u::Mailbox::by_name("Test");
- for
(auto
pair : mboxes) {
+ for
(auto const&
pair : mboxes) {
simgrid::s4u::Actor::create("sender", simgrid::s4u::Host::by_name(pair.first.c_str()), [mailbox, pair, data_size]() {
double start_time = simgrid::s4u::Engine::get_clock();
static std::string message = "message";
simgrid::s4u::Actor::create("sender", simgrid::s4u::Host::by_name(pair.first.c_str()), [mailbox, pair, data_size]() {
double start_time = simgrid::s4u::Engine::get_clock();
static std::string message = "message";
@@
-80,7
+79,7
@@
void run_ping_test(const std::vector<std::pair<std::string,std::string>>& mboxes
for(auto i=1; i<=22; i++) {
l->set_host_rate(simgrid::s4u::Host::by_name("Station "+std::to_string(i)), 0);
}
for(auto i=1; i<=22; i++) {
l->set_host_rate(simgrid::s4u::Host::by_name("Station "+std::to_string(i)), 0);
}
-
}
+ }
simgrid::s4u::this_actor::sleep_for(10);
XBT_INFO("\n");
}
simgrid::s4u::this_actor::sleep_for(10);
XBT_INFO("\n");
}