// src/backend/simulation_statistics.hh - Copyright 2005, 2006, University
//               of Padova, dept. of Pure and Applied
//               Mathematics
//
// This file is part of SGPEMv2.
//
// This is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// SGPEMv2 is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with SGPEMv2. If not, see http://www.gnu.org/licenses/.


#ifndef SIMULATION_STATISTICS_HH
#define SIMULATION_STATISTICS_HH 1

#include <sgpemv2/sgpemv2-visibility.hh>


namespace sgpem
{
	/**		\brief Represents the statistics about a Simulation

		Represents the statistics about a Simulation. This class is created by "Statistics" class
		and presents only "getters" methods which execute no calculations: they only return the
		internal results calulated at construction time.
	*/
	class SimulationStatistics
	{
		public:
			virtual ~SimulationStatistics();

			/// \brief Returns the average inactivity time of all processes and threads
			/// See the documentation of SchedulableStatistics for more informations about this value
			/// \returns The average inactivity time of all processes and threads
			virtual float	get_average_inactivity_time() const =0;

			/// \brief Returns the average execution progress of all processes and threads
			/// See the documentation of SchedulableStatistics for more informations about this value
			/// \returns The average execution progress of all processes and threads
			virtual float	get_average_execution_progress() const =0;

			/// \brief Returns the average inactivity time of all processes and threads
			/// See the documentation of SchedulableStatistics for more informations about this value
			/// \returns The average inactivity time of all processes and threads
			virtual float	get_average_turn_around() const =0;

			/// \brief Returns the average response time of all processes and threads
			/// See the documentation of SchedulableStatistics for more informations about this value
			/// \returns The average response time of all processes and threads
			virtual float	get_average_response_time() const =0;

			/// \brief Returns the documentation of SchedulableStatistics for more informations about this value
			/// See the documentation of SchedulableStatistics for more informations about this value
			/// \returns The average efficency of all processes and threads
			virtual float	get_average_efficiency() const =0;

			/// \brief Returns the number of terminated processes
			/// \returns The number of terminated processes until the instant specified through Statistics::calculateStatisticsAt(int)
			virtual int		get_terminated_processes() const =0;

			/// \brief Returns the number of terminated threads
			/// \returns The number of terminated threads until the instant specified through Statistics::calculateStatisticsAt(int)
			virtual int		get_terminated_threads() const =0;

			/**
				Returns the average of terminated processes during one instant of scheduling time. The
				exact formula is: #_terminated_processes / current_instant

				\returns The average of terminated processes during one instant
			*/
			virtual float	get_average_processes_throughput() const =0;

			/**
				Returns the average of terminated threads during one instant of scheduling time. The
				exact formula is: #_terminated_threads / current_instant

				\returns The average of terminated threads during one instant
			*/
			virtual float	get_average_threads_throughput() const =0;


		protected:

			SimulationStatistics();
	};
}

#endif



