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

Method putCall

src/jrd/Monitoring.cpp:1330–1395  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1328
1329
1330void Monitoring::putCall(SnapshotData::DumpRecord& record, const Request* request)
1331{
1332 fb_assert(request);
1333
1334 const auto dbb = request->req_attachment->att_database;
1335 auto initialRequest = request->req_caller;
1336
1337 while (initialRequest->req_caller)
1338 initialRequest = initialRequest->req_caller;
1339
1340 fb_assert(initialRequest);
1341
1342 record.reset(rel_mon_calls);
1343
1344 // call id
1345 record.storeInteger(f_mon_call_id, request->getRequestId());
1346 // statement id
1347 record.storeInteger(f_mon_call_stmt_id, initialRequest->getRequestId());
1348 // caller id
1349 if (initialRequest != request->req_caller)
1350 record.storeInteger(f_mon_call_caller_id, request->req_caller->getRequestId());
1351
1352 const auto statement = request->getStatement();
1353 const auto routine = statement->getRoutine();
1354
1355 // object name/type
1356 if (routine)
1357 {
1358 if (routine->getName().package.hasData())
1359 record.storeString(f_mon_call_pkg_name, routine->getName().package);
1360
1361 record.storeString(f_mon_call_name, routine->getName().identifier);
1362 record.storeInteger(f_mon_call_type, routine->getObjectType());
1363 }
1364 else if (!statement->triggerName.isEmpty())
1365 {
1366 record.storeString(f_mon_call_name, statement->triggerName);
1367 record.storeInteger(f_mon_call_type, obj_trigger);
1368 }
1369 else
1370 {
1371 // we should never be here...
1372 fb_assert(false);
1373 }
1374
1375 // timestamp
1376 record.storeTimestampTz(f_mon_call_timestamp, request->getTimeStampTz());
1377 // source line/column
1378 if (request->req_src_line)
1379 {
1380 record.storeInteger(f_mon_call_src_line, request->req_src_line);
1381 record.storeInteger(f_mon_call_src_column, request->req_src_column);
1382 }
1383
1384 if (dbb->getEncodedOdsVersion() >= ODS_13_1)
1385 record.storeInteger(f_mon_call_cmp_stmt_id, statement->getStatementId());
1386
1387 // statistics

Callers

nothing calls this directly

Calls 15

genUniqueIdFunction · 0.85
storeIntegerMethod · 0.80
getRequestIdMethod · 0.80
getRoutineMethod · 0.80
storeStringMethod · 0.80
storeTimestampTzMethod · 0.80
getEncodedOdsVersionMethod · 0.80
getStatementIdMethod · 0.80
storeGlobalIdMethod · 0.80
resetMethod · 0.45
getStatementMethod · 0.45
hasDataMethod · 0.45

Tested by

no test coverage detected