#define HST_CLIENT_LEN 256
+#include <sys/time.h>
+static long tt0;
+static long tcount=0;
+static long cumul;
+#define START_TIMING timeval tv; gettimeofday(&tv,0);tt0=tv.tv_usec+tv.tv_sec*1000000;
+#define END_TIMING(NUMBER) \
+ tcount=tcount+1;gettimeofday(&tv,0);cumul=cumul+tv.tv_usec+tv.tv_sec*1000000 -tt0; \
+ if(tcount==NUMBER){ std::cerr << __FILE__ << __LINE__ << " temps CPU(mus): " << cumul << std::endl; tcount=0;cumul=0; }
//=======================================================================
//=======================================================================
Standard_Integer GEOM_Client::Find( const TCollection_AsciiString& IOR, TopoDS_Shape& S )
{
+ //CCAR
+#if 1
+ if(_myIndexes.count(IOR)==0)
+ return 0;
+ else
+ {
+ Standard_Integer i =_myIndexes[IOR];
+ S = myShapes.Value(i);
+ return i;
+ }
+#else
for ( Standard_Integer i = 1; i<= myIORs.Length(); i++ ) {
if (myIORs.Value(i).IsEqual(IOR)) {
S = myShapes.Value(i);
}
}
return 0;
+#endif
}
//=======================================================================
{
myIORs.Append(IOR);
myShapes.Append(S);
+ _myIndexes[IOR]=_myIndexes.size()+1;
}
//=======================================================================
if( anIndex != 0 ) {
myIORs.Remove(anIndex) ;
myShapes.Remove(anIndex) ;
+ _myIndexes.erase(IOR);
}
return ;
}
return ;
myIORs.Clear() ;
myShapes.Clear() ;
+ _myIndexes.clear();
return ;
}
//=======================================================================
TopoDS_Shape GEOM_Client::GetShape( GEOM::GEOM_Gen_ptr geom, GEOM::GEOM_Object_ptr aShape )
{
+ START_TIMING
TopoDS_Shape S;
TCollection_AsciiString IOR = geom->GetStringFromIOR(aShape);
Standard_Integer anIndex = Find(IOR, S);
if (aShape->IsMainShape()) {
S = Load(geom, aShape);
Bind(IOR, S);
+END_TIMING(200)
return S;
}
S = aCompound;
}
Bind(IOR, S);
+END_TIMING(200)
return S;
}
#define GEOMCLIENT_EXPORT
#endif
+#include <TCollection_AsciiString.hxx>
+#include <map>
//=====================================================================
// GEOM_Client : class definition
//=====================================================================
//
TColStd_SequenceOfAsciiString myIORs ;
TopTools_SequenceOfShape myShapes ;
+ std::map< TCollection_AsciiString , int > _myIndexes;
long pid_client;
};
#include "GEOMImpl_Types.hxx"
+#include "OCCViewer_ViewModel.h"
+#include "SALOME_InteractiveObject.hxx"
+#include <sys/time.h>
+static long tt0;
+static long tcount=0;
+static long cumul;
+#define START_TIMING timeval tv; gettimeofday(&tv,0);tt0=tv.tv_usec+tv.tv_sec*1000000;
+#define END_TIMING(NUMBER) \
+ tcount=tcount+1;gettimeofday(&tv,0);cumul=cumul+tv.tv_usec+tv.tv_sec*1000000 -tt0; \
+ if(tcount==NUMBER){ std::cerr << __FILE__ << __LINE__ << " temps CPU(mus): " << cumul << std::endl; tcount=0;cumul=0; }
+
+
using namespace std;
//================================================================
const bool updateViewer,
SALOME_View* theViewFrame )
{
+ //START_TIMING
SALOME_View* vf = theViewFrame ? theViewFrame : GetActiveView();
if ( vf )
{
SALOME_Prs* prs = buildPresentation( theIO->getEntry(), vf );
+ //END_TIMING(1)
if ( prs )
{
vf->BeforeDisplay( this );
//=================================================================
void GEOM_Displayer::Update( SALOME_VTKPrs* prs )
{
+ START_TIMING
SVTK_Prs* vtkPrs = dynamic_cast<SVTK_Prs*>( prs );
if ( !vtkPrs || myShape.IsNull() )
return;
aProp->Delete();
theActors->Delete();
+ END_TIMING(50)
}
//=================================================================
if ( myViewFrame )
{
+ //CCAR
+#if 1
+ prs = LightApp_Displayer::buildPresentation( QString(), theViewFrame );
+#else
prs = LightApp_Displayer::buildPresentation( entry, theViewFrame );
+#endif
if ( prs )
{
Handle( SALOME_InteractiveObject ) theIO = new SALOME_InteractiveObject();
#include CORBA_SERVER_HEADER(GEOM_Gen)
#include <vtkRenderer.h>
+#include <sys/time.h>
+static long tt0;
+static long tcount=0;
+static long cumul;
+#define START_TIMING timeval tv; gettimeofday(&tv,0);tt0=tv.tv_usec+tv.tv_sec*1000000;
+#define END_TIMING(NUMBER) \
+ tcount=tcount+1;gettimeofday(&tv,0);cumul=cumul+tv.tv_usec+tv.tv_sec*1000000 -tt0; \
+ if(tcount==NUMBER){ std::cerr << __FILE__ << __LINE__ << " temps CPU(mus): " << cumul << std::endl; tcount=0;cumul=0; }
+
using namespace std;
{}
virtual void Execute()
{
+ START_TIMING
SUIT_Application* app = SUIT_Session::session()->activeApplication();
if (!app) return;
}
}
}
+ END_TIMING(200)
}
};
#include <StdFail_NotDone.hxx>
#include <gp_Pnt.hxx>
#include <gp.hxx>
+#include <sys/time.h>
+static long tt0;
+static long tcount=0;
+static long cumul;
+#define START_TIMING timeval tv; gettimeofday(&tv,0);tt0=tv.tv_usec+tv.tv_sec*1000000;
+#define END_TIMING(NUMBER) \
+ tcount=tcount+1;gettimeofday(&tv,0);cumul=cumul+tv.tv_usec+tv.tv_sec*1000000 -tt0; \
+ if(tcount==NUMBER){ std::cerr << __FILE__ << __LINE__ << " temps CPU(mus): " << cumul << std::endl; tcount=0;cumul=0; }
+
//=======================================================================
//function : GetID
//=======================================================================
Standard_Integer GEOMImpl_CylinderDriver::Execute(TFunction_Logbook& log) const
{
+ START_TIMING
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
aFunction->SetValue(aShape);
log.SetTouched(Label());
+ END_TIMING(200)
return 1;
}
#include <Standard_Failure.hxx>
#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
+#include <sys/time.h>
+static long tt0;
+static long tcount=0;
+static long cumul;
+#define START_TIMING timeval tv; gettimeofday(&tv,0);tt0=tv.tv_usec+tv.tv_sec*1000000;
+#define END_TIMING(NUMBER) \
+ tcount=tcount+1;gettimeofday(&tv,0);cumul=cumul+tv.tv_usec+tv.tv_sec*1000000 -tt0; \
+ if(tcount==NUMBER){ std::cerr << __FILE__ << __LINE__ << " temps CPU(mus): " << cumul << std::endl; tcount=0;cumul=0; }
+
//=============================================================================
/*!
Handle(GEOM_Object) theVec,
double theR, double theH)
{
+ START_TIMING
+
SetErrorCode(KO);
if (thePnt.IsNull() || theVec.IsNull()) return NULL;
<< thePnt << ", " << theVec << ", " << theR << ", " << theH << ")";
SetErrorCode(OK);
+ END_TIMING(200)
return aCylinder;
}
#include <OSD.hxx>
#include "SALOMEDS_Tool.hxx"
+#include <sys/time.h>
+static long tt0;
+static long tcount=0;
+static long cumul;
+#define START_TIMING timeval tv; gettimeofday(&tv,0);tt0=tv.tv_usec+tv.tv_sec*1000000;
+#define END_TIMING(NUMBER) \
+ tcount=tcount+1;gettimeofday(&tv,0);cumul=cumul+tv.tv_usec+tv.tv_sec*1000000 -tt0; \
+ if(tcount==NUMBER){ std::cerr << __FILE__ << __LINE__ << " temps CPU(mus): " << cumul << std::endl; tcount=0;cumul=0; }
+
//============================================================================
// function : GEOM_Gen_i()
const char* theName,
GEOM::GEOM_Object_ptr theFather)
{
+ START_TIMING
SALOMEDS::SObject_var aResultSO;
if(theObject->_is_nil() || theStudy->_is_nil()) return aResultSO;
SALOMEDS::SObject_var aSubSO = aStudyBuilder->NewObject(aResultSO);
aStudyBuilder->Addreference(aSubSO, aSO);
}
+ END_TIMING(200)
return aResultSO._retn();
}
#include "GEOM_Engine.hxx"
#include "GEOM_Object.hxx"
+#include <sys/time.h>
+static long tt0;
+static long tcount=0;
+static long cumul;
+#define START_TIMING timeval tv; gettimeofday(&tv,0);tt0=tv.tv_usec+tv.tv_sec*1000000;
+#define END_TIMING(NUMBER) \
+ tcount=tcount+1;gettimeofday(&tv,0);cumul=cumul+tv.tv_usec+tv.tv_sec*1000000 -tt0; \
+ if(tcount==NUMBER){ std::cerr << __FILE__ << __LINE__ << " temps CPU(mus): " << cumul << std::endl; tcount=0;cumul=0; }
+
//=============================================================================
/*!
GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakeCylinderRH (CORBA::Double theR,
CORBA::Double theH)
{
+ START_TIMING
GEOM::GEOM_Object_var aGEOMObject;
//Set a not done flag
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
+ END_TIMING(200)
return GetObject(anObject);
}
CORBA::Double theR, CORBA::Double theH)
{
GEOM::GEOM_Object_var aGEOMObject;
+ //START_TIMING
//Set a not done flag
GetOperations()->SetNotDone();
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
+ //END_TIMING(200)
return GetObject(anObject);
}
#include <TopoDS_Iterator.hxx>
#include "utilities.h"
+#include <sys/time.h>
+static long tt0;
+static long tcount=0;
+static long cumul;
+#define START_TIMING timeval tv; gettimeofday(&tv,0);tt0=tv.tv_usec+tv.tv_sec*1000000;
+#define END_TIMING(NUMBER) \
+ tcount=tcount+1;gettimeofday(&tv,0);cumul=cumul+tv.tv_usec+tv.tv_sec*1000000 -tt0; \
+ if(tcount==NUMBER){ std::cerr << __FILE__ << __LINE__ << " temps CPU(mus): " << cumul << std::endl; tcount=0;cumul=0; }
+
using namespace std;
// SALOME
for (ex.Init(myShape, TopAbs_FACE); ex.More(); ex.Next()) {
+ START_TIMING
GEOM_Actor* FaceActor = GEOM_Actor::New();
+ END_TIMING(450)
FaceActor->SetShadingProperty(FaceProp);
FaceActor->SetWireframeProperty(IsoProp);