| 357 | } |
| 358 | |
| 359 | IProfilerSession* 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 | |
| 394 | void ProfilerPlugin::flush(ThrowStatusExceptionWrapper* status) |
| 395 | { |