MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / startSession

Method startSession

src/plugins/profiler/Profiler.cpp:359–392  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

357}
358
359IProfilerSession* ProfilerPlugin::startSession(ThrowStatusExceptionWrapper* status,
360 const char* description, const char* options, ISC_TIMESTAMP_TZ timestamp)
361{
362 AutoDispose<Session> session(FB_NEW Session(status, this, description, timestamp));
363
364 if (options && options[0])
365 {
366 string optionsStr = options;
367 optionsStr.alltrim();
368
369 if (optionsStr.hasData())
370 {
371 optionsStr.upper();
372
373 if (optionsStr == "DETAILED_REQUESTS")
374 session->detailedRequests = true;
375 else
376 {
377 static const ISC_STATUS statusVector[] = {
378 isc_arg_gds,
379 isc_random,
380 isc_arg_string,
381 (ISC_STATUS) "Invalid OPTIONS for Default_Profiler.",
382 isc_arg_end
383 };
384
385 status->setErrors(statusVector);
386 return nullptr;
387 }
388 }
389 }
390
391 return session.release();
392}
393
394void ProfilerPlugin::flush(ThrowStatusExceptionWrapper* status)
395{

Callers

nothing calls this directly

Calls 5

alltrimMethod · 0.80
upperMethod · 0.80
hasDataMethod · 0.45
setErrorsMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected