Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

PsMultiThreadedPvmBenchmarkingController.cxx

Go to the documentation of this file.
00001 /*
00002  * This file is part of openMask © INRIA, CNRS, Universite de Rennes 1 1993-2002, thereinafter the Software
00003  * 
00004  * The Software has been developped within the Siames Project. 
00005  * INRIA, the University of Rennes 1 and CNRS jointly hold intellectual property rights
00006  * 
00007  * The Software has been registered with the Agence pour la Protection des
00008  * Programmes (APP) under registration number IDDN.FR.001.510008.00.S.P.2001.000.41200
00009  *  
00010  * This file may be distributed under the terms of the Q Public License
00011  * version 1.0 as defined by Trolltech AS of Norway and appearing in the file
00012  * LICENSE.QPL included in the packaging of this file.
00013  *
00014  * Licensees holding valid specific licenses issued by INRIA, CNRS or Université de Rennes 1 
00015  * for the software may use this file in accordance with that specific license
00016  *
00017  */
00018 #include "PsMultiThreadedPvmBenchmarkingController.h"
00019 
00020 #include "PsnMultiThreadedBenchmarkingScheduler.h"
00021 
00022 PsMultiThreadedPvmBenchmarkingController::PsMultiThreadedPvmBenchmarkingController (PsObjectDescriptor & initialObjects,
00023                                                                                     const PsDate & initialDate, 
00024                                                                                     int argc,
00025                                                                                     char * argv []) : 
00026    PsPvmBenchController<PsMultiThreadedPvmController>(initialObjects,
00027                                                       initialDate,
00028                                                       argc,
00029                                                       argv)
00030 {
00031 
00032 }
00033 
00034 PsMultiThreadedPvmBenchmarkingController::~PsMultiThreadedPvmBenchmarkingController() 
00035 {
00036 
00037 }
00038 
00039 PsnScheduler * PsMultiThreadedPvmBenchmarkingController::createScheduler() 
00040 {
00041    PsnScheduler * res ;
00042 
00043    if (_startSamplingDate<PsController::initialSimulationDate) 
00044       {
00045          _startSamplingDate=PsController::initialSimulationDate;
00046          cout<<"PsBenchController::WARNING : no values before PsController::initialSimulationDate ("
00047              <<PsController::initialSimulationDate<<")"<<endl;
00048       }
00049 
00050    _numberOfSamples = (_endSamplingDate-_startSamplingDate)/_stepPeriod + 1;
00051 
00052    if ( _file != NULL ) 
00053       {
00054          res = new PsnMultiThreadedBenchmarkingScheduler(_nbStepsByCycle, 
00055                                                          _numberOfThreads, 
00056                                                          true, 
00057                                                          _sampleIndex, 
00058                                                          _numberOfSamples,
00059                                                          *_file) ;
00060       }
00061    else 
00062       {
00063          res = new PsnMultiThreadedBenchmarkingScheduler(_nbStepsByCycle, 
00064                                                          _numberOfThreads, 
00065                                                          true,
00066                                                          _sampleIndex, 
00067                                                          _numberOfSamples, 
00068                                                          cout ) ;
00069       }
00070 
00071 
00072    _stepDurationTab.resize(_numberOfSamples) ;
00073 
00074    _completeDurationTab.resize(_numberOfSamples) ;
00075 
00076    _networkReceiveDurationTab.resize(_numberOfSamples) ;
00077 
00078    _networkSendDurationTab.resize(_numberOfSamples) ;
00079 
00080    _demarshallingDurationTab.resize(_numberOfSamples) ;
00081 
00082    _marshallingDurationTab.resize(_numberOfSamples) ;
00083 
00084    return res ;
00085 
00086 }

logo OpenMask

Documentation generated on Mon Nov 25 15:25:00 2002

Generated with doxygen 1.2.12 by Dimitri van Heesch ,   1997-2001