Beispiel #1
0
::std::string to_string(FwdItT first, FwdItT last)
{
	DCS_MACRO_SUPPRESS_UNUSED_VARIABLE_WARNING( first );
	DCS_MACRO_SUPPRESS_UNUSED_VARIABLE_WARNING( last );

    return "";
}
	public: bool detect(uint_type r_cur, real_type estimate, real_type stddev)
	{
		DCS_MACRO_SUPPRESS_UNUSED_VARIABLE_WARNING( r_cur );
		DCS_MACRO_SUPPRESS_UNUSED_VARIABLE_WARNING( estimate );
		DCS_MACRO_SUPPRESS_UNUSED_VARIABLE_WARNING( stddev );

//		estimators_.push_back(estimator);

		return true;
	}
Beispiel #3
0
	// Handle the beginning of a new replication
	private: void process_begin_of_replication(des_event_type const& evt, des_engine_context_type& ctx)
	{
		DCS_MACRO_SUPPRESS_UNUSED_VARIABLE_WARNING(evt);
		DCS_MACRO_SUPPRESS_UNUSED_VARIABLE_WARNING(ctx);

		uint_type seed = rnd_dev_();
		rng_.seed(seed);

		queue_.reset();
	}
    optimal_initial_placement_strategy& operator=(optimal_initial_placement_strategy const& rhs)
    {
        DCS_MACRO_SUPPRESS_UNUSED_VARIABLE_WARNING(rhs);

        //TODO
        DCS_EXCEPTION_THROW( ::std::runtime_error, "Copy-assigment not yet implemented." );
    }
    optimal_initial_placement_strategy(optimal_initial_placement_strategy const& that)
    {
        DCS_MACRO_SUPPRESS_UNUSED_VARIABLE_WARNING(that);

        //TODO
        DCS_EXCEPTION_THROW( ::std::runtime_error, "Copy-constructor not yet implemented." );
    }
	/// Copy assignment.
	private: virtual_machine_monitor& operator=(virtual_machine_monitor const& rhs)
	{
		DCS_MACRO_SUPPRESS_UNUSED_VARIABLE_WARNING(rhs);

		//TODO
		DCS_EXCEPTION_THROW( ::std::runtime_error, "Copy-assigment not yet implemented." );
	}
	/// Copy constructor.
	private: virtual_machine_monitor(virtual_machine_monitor const& that)
	{
		DCS_MACRO_SUPPRESS_UNUSED_VARIABLE_WARNING(that);

		//TODO
		DCS_EXCEPTION_THROW( ::std::runtime_error, "Copy-constructor not yet implemented." );
	}
	/// Copy constructor.
	private: pid_application_controller(pid_application_controller const& that)
	{
		DCS_MACRO_SUPPRESS_UNUSED_VARIABLE_WARNING(that);

		//TODO
		DCS_EXCEPTION_THROW( ::std::runtime_error, "Copy-constructor not yet implemented." );
	}
	/// Copy assignment.
	private: physical_resource& operator=(physical_resource const& rhs)
	{
		DCS_MACRO_SUPPRESS_UNUSED_VARIABLE_WARNING(rhs);

		//TODO
		DCS_EXCEPTION_THROW( ::std::runtime_error, "Copy-assigment not yet implemented." );
	}
	/// Copy assignment.
	private: pid_application_controller& operator=(pid_application_controller const& rhs)
	{
		DCS_MACRO_SUPPRESS_UNUSED_VARIABLE_WARNING(rhs);

		//TODO
		DCS_EXCEPTION_THROW( ::std::runtime_error, "Copy-assigment not yet implemented." );
	}
	/// Copy constructor.
	private: physical_resource(physical_resource const& that)
	{
		DCS_MACRO_SUPPRESS_UNUSED_VARIABLE_WARNING(that);

		//TODO
		DCS_EXCEPTION_THROW( ::std::runtime_error, "Copy-constructor not yet implemented." );
	}
Beispiel #12
0
inline
RealT scale_resource_utilization(RealT source_capacity,
								 RealT source_share,
								 RealT target_capacity,
								 RealT target_share,
								 RealT source_utilization,
								 RealT target_threshold = ::std::numeric_limits<RealT>::infinity())
{
	/// Utilization is insensible to the share.
	/// As a matter of fact, utilization is computed as busy-time/uptime:
	/// $U=\frac{B}{T}$
	///
	/// Suppose that a VM induces on a physical machine a utilization of $U=0.5$, when it owns the 100% of the physical resource capacity.
	/// If this VM gets a resource share of $s=0.5$, then the busy-time $B^{\prime}$, approximately, double since the VM will take the double of the time to complete the same operations.
	/// So, one can think that also the utilization double too, that is $U^{\prime}=1$.
	///
	/// However, that formula for computing the utilization assumes that the CPU is always used at 100%.
	/// Instead, it would be right to estimate the utilization as:
	/// 	$U=s\frac{B}{T}$
	/// so that the utilization induced by the VM is relative to the fraction of obtained CPU capacity.
	/// This is implies that the VMM is working in a non-conservative approach, so that if the physical machine has free capacity -- in excess to the one allocated to the VM -- this capacity is not assigned to the VM).
	///
	/// Thus, in the preceeding example we can state that
	/// $U^{\prime}=0.5\frac{B^{\prime}}{T}=0.5\frac{2B}{T}=\frac{B}{T}=U$
	/// that is, utilization is insensible to the share.
	/// Obviously, utilization will remain sensible to the CPU capacity.
	/// Specifically, if a VM is moved to a machine with capacity $C^{\prime}$ different from the initial one $C$, the scaling of utilization must be take care of this difference, that is:
	///     $U^{\prime}=U\frac{C}{C^{\prime}}$
	/// For instance, if the target machine has a capacity $C^{\prime}$ which is double of the initial one $C$, the new utilization is the half of the original one.

	DCS_MACRO_SUPPRESS_UNUSED_VARIABLE_WARNING(source_share);
	DCS_MACRO_SUPPRESS_UNUSED_VARIABLE_WARNING(target_share);

	//RealT target_utilization(source_utilization/resource_scaling_factor(source_capacity, source_share, target_capacity, target_share));
	RealT target_utilization(source_utilization/resource_scaling_factor(source_capacity, target_capacity));

	return ::std::isfinite(target_threshold)
		   ? ::std::min(target_utilization, target_threshold)
		   : target_utilization;
}
Beispiel #13
0
	private: void do_process_departure(customer_pointer const& ptr_customer, engine_context_type& ctx)
	{
		DCS_MACRO_SUPPRESS_UNUSED_VARIABLE_WARNING( ctx );

		// precondition: customer pointer must be a valid pointer
		DCS_DEBUG_ASSERT( ptr_customer );

		DCS_DEBUG_TRACE_L(3, "(" << this << ") BEGIN Do Processing DEPARTURE at Node: " << *this << " of Customer: " << *ptr_customer << " (Clock: " << ctx.simulated_time() << ")."); //XXX

		this->network().schedule_departure(ptr_customer, real_type/*zero*/());

		DCS_DEBUG_TRACE_L(3, "(" << this << ") END Do Processing DEPARTURE at Node: " << *this << " of Customer: " << *ptr_customer << " (Clock: " << ctx.simulated_time() << ")."); //XXX
	}
Beispiel #14
0
	// Handle the end of a new replication
	private: void process_end_of_replication(des_event_type const& evt, des_engine_context_type& ctx)
	{
		DCS_MACRO_SUPPRESS_UNUSED_VARIABLE_WARNING(ctx);

		uint_type repl_num = evt.template unfolded_state<uint_type>();

		if (verbose_)
		{
			::std::cout	<< "Replication #" << repl_num << ::std::endl
						<< "  # Arrivals: " << queue_.num_arrivals() << ::std::endl
						<< "  # Departures: " << queue_.num_departures() << ::std::endl
						<< "  # Discards: " << queue_.num_discards() << ::std::endl
						<< "  Response Time: " << ::std::endl
						<< "    Mean: " << *ptr_mean_response_time_ << ::std::endl
						<< "    99th Quantile: " << *ptr_q99_response_time_ << ::std::endl;
		}
	}
	/// Copy contructor
	private: multi_tier_application(multi_tier_application<traits_type> const& that)
/*
	: id_(traits_type::invalid_application_id),
	  name_(that.name_),
	  tiers_(that.tiers_),
	  sla_cost_model_(that.sla_cost_model_),
	  ref_resources_(that.ref_resources_),
	  ptr_perf_model_(that.ptr_perf_model_->clone()),
	  ptr_sim_model_(that.ptr_perf_model_->clone()),
	  ptr_dc_(that.ptr_dc_)
*/
	{
		DCS_MACRO_SUPPRESS_UNUSED_VARIABLE_WARNING(that);

		//TODO
		DCS_EXCEPTION_THROW( ::std::runtime_error, "Copy constructor not yet implemented." );
	}
	/// Copy assignment
	private: multi_tier_application<traits_type>& operator=(multi_tier_application<traits_type> const& rhs)
	{
		DCS_MACRO_SUPPRESS_UNUSED_VARIABLE_WARNING(rhs);

/*
		if (&rhs != this)
		{
			id_ = traits_type::invalid_application_id;
			name_ = rhs.name_;
			tiers_ = rhs.tiers_;
			sla_cost_model_ = rhs.sla_cost_model_;
			ref_resources_ = rhs.ref_resources_;
			ptr_perf_model_ = rhs.ptr_perf_model_->clone();
			ptr_sim_model_ = rhs.ptr_sim_model_->clone();
			ptr_dc_ = rhs.ptr_dc_;
		}

		return this;
*/
		//TODO
		DCS_EXCEPTION_THROW( ::std::runtime_error, "Copy assignment not yet implemented." );
	}
Beispiel #17
0
::std::string to_string(T const& t)
{
	DCS_MACRO_SUPPRESS_UNUSED_VARIABLE_WARNING( t );

    return "";
}
	private: bool do_can_push(customer_pointer const& ptr_customer) const
	{
		DCS_MACRO_SUPPRESS_UNUSED_VARIABLE_WARNING( ptr_customer );

		return this->infinite_capacity() || (this->size() < this->capacity());
	}
	protected: virtual void do_enable(bool flag)
	{
		DCS_MACRO_SUPPRESS_UNUSED_VARIABLE_WARNING(flag);
	}