#define _KADEMLIA_EXAMPLES_COMMON
#define max_join_trials 4
-#define RECEIVE_TIMEOUT 1
-
#define find_node_timeout 10
#define find_node_global_timeout 50
#define bucket_size 20
#define identifier_size 32
-#define max_answers_to_ask 20
#define random_lookup_interval 100
#include <simgrid/s4u.hpp>
#include <xbt/RngStream.h>
-#define MAILBOX_SIZE 40
#define TRACKER_MAILBOX "tracker_mailbox"
/** Max number of peers sent by the tracker to clients */
#define MAXIMUM_PEERS 50
/** Communication size for a task to the tracker */
#define TRACKER_COMM_SIZE 1
#define GET_PEERS_TIMEOUT 10000
-#define TIMEOUT_MESSAGE 10
-#define TRACKER_RECEIVE_TIMEOUT 10
/** Number of peers that can be unchocked at a given time */
#define MAX_UNCHOKED_PEERS 4
/** Interval between each update of the choked peers */
#define UPDATE_CHOKED_INTERVAL 30
-/** Number of pieces the peer asks for simultaneously */
-#define MAX_PIECES 1
/** Message sizes
* Sizes based on report by A. Legout et al, Understanding BitTorrent: An Experimental Perspective
XBT_INFO("not bound => duration %f (%f flops/s)", duration, flops_per_sec);
}
-#define DOUBLE_MAX 1e11
static void worker_busy_loop(const char* name, double speed)
{
- simgrid::s4u::ExecPtr exec = simgrid::s4u::this_actor::exec_async(DOUBLE_MAX);
- double exec_remain_prev = DOUBLE_MAX;
+ double exec_remain_prev = 1e11;
+ simgrid::s4u::ExecPtr exec = simgrid::s4u::this_actor::exec_async(exec_remain_prev);
for (int i = 0; i < 10; i++) {
if (speed > 0) {
double new_bound = (speed / 10) * i;
class Message;
}
-#define max_join_trials 4
-
-#define RECEIVE_TIMEOUT 1
-
#define find_node_timeout 10
#define find_node_global_timeout 50
#define BUCKET_SIZE 20
#define identifier_size 32
-#define max_answers_to_ask 20
#define random_lookup_interval 100
allVms_.push_back(piface);
/* We create cpu_action corresponding to a VM process on the host operating system. */
- /* TODO: we have to periodically input GUESTOS_NOISE to the system? how ? */
+ /* TODO: we have to periodically input GUESTOS_NOISE to the system? how ?
+ * The value for GUESTOS_NOISE corresponds to the cost of the global action associated to the VM. It corresponds to
+ * the cost of a VM running no tasks.
+ */
action_ = host_PM->pimpl_cpu->execution_start(0, core_amount);
// It's empty for now, so it should not request resources in the PM
#ifndef VM_INTERFACE_HPP_
#define VM_INTERFACE_HPP_
-#define GUESTOS_NOISE 100 // This value corresponds to the cost of the global action associated to the VM
- // It corresponds to the cost of a VM running no tasks.
-
namespace simgrid {
namespace vm {
/** Communication size for a task to the tracker */
#define TRACKER_COMM_SIZE 1
#define GET_PEERS_TIMEOUT 10000
-#define TIMEOUT_MESSAGE 10
-#define TRACKER_RECEIVE_TIMEOUT 10
/** Number of peers that can be unchocked at a given time */
#define MAX_UNCHOKED_PEERS 4
/** Interval between each update of the choked peers */
#define UPDATE_CHOKED_INTERVAL 30
-/** Number of pieces the peer asks for simultaneously */
-#define MAX_PIECES 1
#endif /* BITTORRENT_BITTORRENT_H_ */