예제 #1
0
JNIEXPORT void JNICALL Java_com_insightfullogic_honest_1profiler_core_control_Agent_setFilePath(JNIEnv *env, jclass klass, jstring filePath) {
    Profiler *prof = getProfiler();

    if (filePath == NULL) {
    	prof->setFilePath(NULL);
    } else {
    	const char *nativeString = env->GetStringUTFChars(filePath, 0);
    	prof->setFilePath((char*)nativeString);
    	env->ReleaseStringUTFChars(filePath, nativeString);
    }
}
PSPSDLProfiler* PSPSDLProfilerMg::createProfiler(const char* functionName, 
													bool begin)
{
	// Do not create a new profiler if one already exists
	PSPSDLProfiler* p = getProfiler(functionName);
	
	// If it doesn't exists than create one and push it in the list
	if (!p) {
		p = new PSPSDLProfiler(functionName);
		if (!p) return NULL;
		
		profilers.push_back(p);
	}
	
	// Anyway if instructed to do so, begin.
	if (begin) this->begin(p);
	
	return p;
}
예제 #3
0
//! constructor
CGUIProfiler::CGUIProfiler(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle, IProfiler* profiler)
	: IGUIProfiler(environment, parent, id, rectangle, profiler)
	, Profiler(profiler)
	, DisplayTable(0), CurrentGroupIdx(0), CurrentGroupPage(0), NumGroupPages(1)
	, DrawBackground(false), Frozen(false), UnfreezeOnce(false), ShowGroupsTogether(false)
	, MinCalls(0), MinTimeSum(0), MinTimeAverage(0.f), MinTimeMax(0)
{
	if ( !Profiler )
		Profiler = &getProfiler();

	core::recti r(0, 0, rectangle.getWidth(), rectangle.getHeight());

	// Really just too lazy to code a complete new element for this.
    // If anyone can do this nicer he's welcome.
	DisplayTable = Environment->addTable(r, this, -1, DrawBackground);
	DisplayTable->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT);
	DisplayTable->setSubElement(true);
	rebuildColumns();
}
void PSPSDLProfilerMg::end(const char* functionName)
{
	end(getProfiler(functionName));
}
예제 #5
0
JNIEXPORT void JNICALL Java_com_insightfullogic_honest_1profiler_core_control_Agent_setMaxFramesToCapture(JNIEnv *env, jclass klass, jint maxFramesToCapture) {
    Profiler *prof = getProfiler();

    prof->setMaxFramesToCapture(maxFramesToCapture);
}
예제 #6
0
JNIEXPORT void JNICALL Java_com_insightfullogic_honest_1profiler_core_control_Agent_setSamplingInterval(JNIEnv *env, jclass klass, jint intervalMin, jint intervalMax) {
    Profiler *prof = getProfiler();

    prof->setSamplingInterval(intervalMin, intervalMax);
}
예제 #7
0
JNIEXPORT jstring JNICALL Java_com_insightfullogic_honest_1profiler_core_control_Agent_getFilePath(JNIEnv *env, jclass klass) {
    Profiler *prof = getProfiler();

    return env->NewStringUTF(prof->getFilePath().c_str());
}
예제 #8
0
JNIEXPORT jint JNICALL Java_com_insightfullogic_honest_1profiler_core_control_Agent_getSamplingIntervalMax(JNIEnv *env, jclass klass) {
    Profiler *prof = getProfiler();

    return prof->getSamplingIntervalMax();
}
예제 #9
0
JNIEXPORT jint JNICALL Java_com_insightfullogic_honest_1profiler_core_control_Agent_getMaxFramesToCapture(JNIEnv *env, jclass klass) {
    Profiler *prof = getProfiler();

    return prof->getMaxFramesToCapture();
}
예제 #10
0
JNIEXPORT jboolean JNICALL Java_com_insightfullogic_honest_1profiler_core_control_Agent_isRunning(JNIEnv *env, jclass klass) {
    Profiler *prof = getProfiler();

    return prof->isRunning();
}
예제 #11
0
JNIEXPORT void JNICALL Java_com_insightfullogic_honest_1profiler_core_control_Agent_stop(JNIEnv *env, jclass klass) {
    Profiler *prof = getProfiler();

    prof->stop();
}
예제 #12
0
파일: profiler.cpp 프로젝트: MoLAoS/Mandate
void sectionEnd(const string &name) {
	getProfiler().sectionEnd(name);
}
예제 #13
0
파일: profiler.cpp 프로젝트: MoLAoS/Mandate
void sectionBegin(const string &name) {
	getProfiler().sectionBegin(name);
}
예제 #14
0
파일: profiler.cpp 프로젝트: MoLAoS/Mandate
void profileEnd(){
	getProfiler().close();
}