1 /* Copyright (c) 2004-2020. The SimGrid Team. All rights reserved. */
3 /* This program is free software; you can redistribute it and/or modify it
4 * under the terms of the license (GNU LGPL) which comes with this package. */
6 #ifndef SIMGRID_KERNEL_PROFILE_DATEDVALUE
7 #define SIMGRID_KERNEL_PROFILE_DATEDVALUE
9 #include "simgrid/forward.h"
16 /** @brief Modeling of the availability profile (due to an external load) or the churn
18 * There is 4 main concepts in this module:
19 * - #simgrid::kernel::profile::DatedValue: a pair <timestamp, value> (both are of type double)
20 * - #simgrid::kernel::profile::Profile: a list of dated values
21 * - #simgrid::kernel::profile::Event: links a given trace to a given SimGrid resource.
22 * A Cpu for example has 2 kinds of events: state (ie, is it ON/OFF) and speed,
23 * while a link has 3 iterators: state, bandwidth and latency.
24 * - #simgrid::kernel::profile::FutureEvtSet: makes it easy to find the next occurring event of all profiles
26 class XBT_PUBLIC DatedValue {
30 explicit DatedValue() = default;
31 explicit DatedValue(double d, double v) : date_(d), value_(v) {}
32 bool operator==(DatedValue const& e2) const;
33 bool operator!=(DatedValue const& e2) const { return not(*this == e2); }
36 } // namespace profile
38 } // namespace simgrid