- Finished backend statistics, added two source files, added simple and TEMPORARY printouts into
simulation_widget git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@1080 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
20aa646546
commit
2d87f354e1
10 changed files with 533 additions and 24 deletions
|
@ -19,16 +19,55 @@
|
|||
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
#include "concrete_statistics.hh"
|
||||
#include "sgpemv2/simulation.hh"
|
||||
#include "sgpemv2/history.hh"
|
||||
#include "sgpemv2/environment.hh"
|
||||
#include "sgpemv2/schedulable.hh"
|
||||
#include "sgpemv2/process.hh"
|
||||
#include "sgpemv2/thread.hh"
|
||||
#include "thread_statistics.hh"
|
||||
#include "process_statistics.hh"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
using namespace sgpem;
|
||||
using namespace std;
|
||||
|
||||
ConcreteStatistics::ConcreteStatistics()
|
||||
{}
|
||||
|
||||
|
||||
std::vector<SchedulableStatistics*>
|
||||
ConcreteStatistics::get_schedulable_statistics(const int& instant) const
|
||||
vector<ProcessStatistics>
|
||||
ConcreteStatistics::get_process_statistics(const int& instant) const
|
||||
{
|
||||
return std::vector<SchedulableStatistics*>();
|
||||
//vector<ThreadStatistics*> thread_stats;
|
||||
vector<ProcessStatistics> rit;
|
||||
|
||||
const History& hist = Simulation::get_instance().get_history();
|
||||
const Environment& env = hist.get_environment_at(instant);
|
||||
const vector<Process*> procs = env.get_processes();
|
||||
|
||||
//first calculate all THREADS statistics
|
||||
for (uint i_p=0; i_p < procs.size(); i_p++)
|
||||
{
|
||||
/*const vector<Thread*> threads = procs[i_p]->get_threads();
|
||||
for (uint i_t = 0; i_t < threads.size(); i_t++)
|
||||
{
|
||||
ThreadStatistics* s = new ThreadStatistics(threads[i_t], instant);
|
||||
thread_stats.push_back(s);
|
||||
rit.push_back(s);
|
||||
}
|
||||
*/
|
||||
rit.push_back(ProcessStatistics(procs[i_p], instant));
|
||||
}
|
||||
/*
|
||||
//then calculate PROCESSES statistics USING the previous ones
|
||||
for (uint i_p=0; i_p < procs.size(); i_p++)
|
||||
{
|
||||
SchedulableStatistics* s = new ProcessStatistics(procs[i_p], instant, &thread_stats);
|
||||
rit.push_back(s);
|
||||
}
|
||||
*/
|
||||
return rit;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue