-/* Copyright (c) 2013-2022. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2013-2023. 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. */
*********/
namespace simgrid::kernel::resource {
-static FactorSet cfg_latency_factor("network/latency-factor");
-static FactorSet cfg_bandwidth_factor("network/bandwidth-factor");
-
-config::Flag<std::string> cfg_latency_factor_str(
- "network/latency-factor", std::initializer_list<const char*>{"smpi/lat-factor"},
- "Correction factor to apply to the provided latency (default value overridden by network model)", "1.0");
-static config::Flag<std::string> cfg_bandwidth_factor_str(
- "network/bandwidth-factor", std::initializer_list<const char*>{"smpi/bw-factor"},
- "Correction factor to apply to the provided bandwidth (default value overridden by network model)", "1.0");
-
-double NetworkModel::get_latency_factor(double size)
-{
- if (not cfg_latency_factor.is_initialized()) // lazy initiaization to avoid initialization fiasco
- cfg_latency_factor.parse(cfg_latency_factor_str.get());
-
- return cfg_latency_factor(size);
-}
-double NetworkModel::get_bandwidth_factor(double size)
-{
- if (not cfg_bandwidth_factor.is_initialized())
- cfg_bandwidth_factor.parse(cfg_bandwidth_factor_str.get());
-
- return cfg_bandwidth_factor(size);
-}
/** @brief Command-line option 'network/TCP-gamma' -- see @ref options_model_network_gamma */
config::Flag<double> NetworkModel::cfg_tcp_gamma(