#include "simgrid/kernel/resource/Resource.hpp"
#include "simgrid/s4u/Host.hpp"
#include "src/kernel/lmm/maxmin.hpp"
+#include "src/surf/trace_mgr.hpp"
#include <list>
*/
class XBT_PUBLIC CpuModel : public kernel::resource::Model {
public:
+ explicit CpuModel(kernel::resource::Model::UpdateAlgo algo) : Model(algo) {}
+
/**
* @brief Create a Cpu
*
public:
/** @brief Get the available speed of the current Cpu */
- virtual double getAvailableSpeed();
+ virtual double get_available_speed();
/** @brief Get the current Cpu computational speed */
virtual double getPstateSpeed(int pstate_index);
int pstate_ = 0; /*< Current pstate (index in the speedPeakList)*/
virtual void setStateTrace(tmgr_trace_t trace); /*< setup the trace file with states events (ON or OFF). Trace must contain boolean values (0 or 1). */
- virtual void setSpeedTrace(tmgr_trace_t trace); /*< setup the trace file with availability events (peak speed changes due to external load). Trace must contain relative values (ratio between 0 and 1) */
+ virtual void
+ set_speed_trace(tmgr_trace_t trace); /*< setup the trace file with availability events (peak speed changes due to
+ external load). Trace must contain relative values (ratio between 0 and 1) */
tmgr_trace_event_t stateEvent_ = nullptr;
Metric speed_ = {1.0, 0, nullptr};
void update_remains_lazy(double now) override;
std::list<Cpu*> cpus();
-
+
void suspend() override;
void resume() override;
};