-/* Copyright (c) 2017-2021. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2017-2022. 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. */
#include "catch.hpp"
-#include "simgrid/kernel/resource/Resource.hpp"
+#include "src/kernel/resource/Resource.hpp"
#include "src/kernel/resource/profile/DatedValue.hpp"
#include "src/kernel/resource/profile/Event.hpp"
#include "src/kernel/resource/profile/Profile.hpp"
public:
static double the_date;
- explicit MockedResource() { this->set_name("fake"); }
+ explicit MockedResource() : Resource("fake"){}
void apply_event(simgrid::kernel::profile::Event* event, double value) override
{
XBT_VERB("t=%.1f: Change value to %lg (idx: %u)", the_date, value, event->idx);
simgrid::kernel::profile::Profile* trace = simgrid::kernel::profile::Profile::from_string("TheName", str, 0);
XBT_VERB("---------------------------------------------------------");
XBT_VERB("data>>\n%s<<data\n", str);
- for (auto const& evt : trace->event_list)
+ for (auto const& evt : trace->get_event_list())
XBT_VERB("event: d:%lg v:%lg", evt.date_, evt.value_);
MockedResource daResource;
static std::vector<simgrid::kernel::profile::StochasticDatedValue> trace2selist(const char* str)
{
const simgrid::kernel::profile::Profile* trace = simgrid::kernel::profile::Profile::from_string("TheName", str, 0);
- std::vector<simgrid::kernel::profile::StochasticDatedValue> stocevlist = trace->stochastic_event_list;
+ std::vector<simgrid::kernel::profile::StochasticDatedValue> stocevlist = trace->get_stochastic_event_list();
tmgr_finalize();
return stocevlist;
}