-/* Copyright (c) 2007-2019. The SimGrid Team.
+/* Copyright (c) 2007-2020. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_test, "Messages specific for this msg example");
const int FAIL_ON_ERROR = 0;
-const int flop_amount = 100000000;
+const int flop_amount = 100000000; // 100Mf, so that computing this on a 1Gf core takes exactly 0.1s
int failed_test = 0;
double energy = 0;
return 0;
}
-static void run_test_process(std::string name, simgrid::s4u::Host *location, int size)
+static void run_test_process(const std::string& name, simgrid::s4u::Host* location, int size)
{
std::vector<std::string> arg = {std::to_string(size)};
- simgrid::s4u::Actor::create(name, location, computation_fun, arg);
+ simgrid::s4u::Actor::create(std::move(name), location, computation_fun, arg);
}
-static void test_energy_consumption(std::string name, int nb_cores)
+static void test_energy_consumption(const std::string& name, int nb_cores)
{
double new_energy = 0;
}
}
-static void run_test(std::string chooser)
+static void run_test(const std::string& chooser)
{
simgrid::s4u::Host *pm0 = simgrid::s4u::Host::by_name("node-0.1core.org");
simgrid::s4u::Host *pm1 = simgrid::s4u::Host::by_name("node-1.1core.org");