namespace simgrid {
namespace kernel {
namespace profile {
-
+
FutureEvtSet::FutureEvtSet() = default;
FutureEvtSet::~FutureEvtSet()
{
if (event_date > date || heap_.empty())
return nullptr;
- Event* event = heap_.top().second;
- Profile* profile = event->profile;
+ Event* event = heap_.top().second;
+ Profile* profile = event->profile;
DatedValue dateVal = profile->next(event);
*resource = event->resource;
- *value = dateVal.value_;
+ *value = dateVal.value_;
heap_.pop();
/* 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. */
+#include "src/kernel/resource/profile/Profile.hpp"
+#include "simgrid/forward.h"
+#include "src/kernel/resource/profile/DatedValue.cpp"
+#include "src/kernel/resource/profile/FutureEvtSet.cpp"
#include "xbt/log.h"
#include "xbt/sysdep.h"
-#include <ostream>
-#include "src/kernel/resource/profile/Profile.hpp"
#include <boost/algorithm/string.hpp>
-#include "src/kernel/resource/profile/FutureEvtSet.cpp"
-#include "src/kernel/resource/profile/DatedValue.cpp"
-#include "simgrid/forward.h"
+#include <ostream>
#include <vector>
static std::unordered_map<std::string, simgrid::kernel::profile::Profile*> trace_list;
DatedValue val(0, -1);
event_list.push_back(val);
}
-Profile::~Profile() = default;
+Profile::~Profile() = default;
/** @brief Register this profile for that resource onto that FES,
* and get an iterator over the integrated trace */
return Profile::from_string(path, buffer.str(), -1);
}
-
+
} // namespace profile
} // namespace kernel
} // namespace simgrid
#include "src/kernel/resource/profile/DatedValue.hpp"
#include "src/kernel/resource/profile/FutureEvtSet.hpp"
-#include <vector>
#include <queue>
+#include <vector>
namespace simgrid {
namespace kernel {
namespace profile {
-
+
class Event {
public:
Profile* profile;
resource::Resource* resource;
bool free_me;
};
-
+
/** @brief A profile is a set of timed values, encoding the value that a variable takes at what time
*
* It is useful to model dynamic platforms, where an external load that makes the resource availability change over