mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 04:43:03 +01:00
More complete solution for early monitoring initialization
This commit is contained in:
parent
d1e90e035e
commit
0d8cde9252
@ -1134,6 +1134,7 @@ void Monitoring::putCall(SnapshotData::DumpRecord& record, const jrd_req* reques
|
||||
putMemoryUsage(record, request->req_memory_stats, stat_id, stat_call);
|
||||
}
|
||||
|
||||
|
||||
void Monitoring::putStatistics(SnapshotData::DumpRecord& record, const RuntimeStatistics& statistics,
|
||||
int stat_id, int stat_group)
|
||||
{
|
||||
@ -1204,6 +1205,7 @@ void Monitoring::putStatistics(SnapshotData::DumpRecord& record, const RuntimeSt
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Monitoring::putContextVars(SnapshotData::DumpRecord& record, const StringMap& variables,
|
||||
SINT64 object_id, bool is_attachment)
|
||||
{
|
||||
@ -1223,6 +1225,7 @@ void Monitoring::putContextVars(SnapshotData::DumpRecord& record, const StringMa
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Monitoring::putMemoryUsage(SnapshotData::DumpRecord& record, const MemoryStats& stats,
|
||||
int stat_id, int stat_group)
|
||||
{
|
||||
@ -1270,8 +1273,7 @@ void Monitoring::dumpAttachment(thread_db* tdbb, Attachment* attachment)
|
||||
const AttNumber att_id = attachment->att_attachment_id;
|
||||
const MetaName& user_name = attachment->att_user->getUserName();
|
||||
|
||||
if (!dbb->dbb_monitoring_data)
|
||||
dbb->dbb_monitoring_data = FB_NEW_POOL(pool) MonitoringData(dbb);
|
||||
fb_assert(dbb->dbb_monitoring_data);
|
||||
|
||||
MonitoringData::Guard guard(dbb->dbb_monitoring_data);
|
||||
dbb->dbb_monitoring_data->cleanup(att_id);
|
||||
@ -1334,15 +1336,15 @@ void Monitoring::publishAttachment(thread_db* tdbb)
|
||||
Database* const dbb = tdbb->getDatabase();
|
||||
Attachment* const attachment = tdbb->getAttachment();
|
||||
|
||||
if (!dbb->dbb_monitoring_data)
|
||||
dbb->dbb_monitoring_data = FB_NEW_POOL(*dbb->dbb_permanent) MonitoringData(dbb);
|
||||
|
||||
const char* user_name = attachment->att_user ? attachment->att_user->getUserName().c_str() : "";
|
||||
|
||||
fb_assert(dbb->dbb_monitoring_data);
|
||||
|
||||
MonitoringData::Guard guard(dbb->dbb_monitoring_data);
|
||||
dbb->dbb_monitoring_data->setup(attachment->att_attachment_id, user_name);
|
||||
}
|
||||
|
||||
|
||||
void Monitoring::cleanupAttachment(thread_db* tdbb)
|
||||
{
|
||||
Database* const dbb = tdbb->getDatabase();
|
||||
|
@ -2755,6 +2755,7 @@ JAttachment* JProvider::createDatabase(CheckStatusWrapper* user_status, const ch
|
||||
dbb, Ods::hdr_nbak_normal);
|
||||
dbb->dbb_backup_manager->dbCreating = true;
|
||||
dbb->dbb_crypto_manager = FB_NEW_POOL(*dbb->dbb_permanent) CryptoManager(tdbb);
|
||||
dbb->dbb_monitoring_data = FB_NEW_POOL(*dbb->dbb_permanent) MonitoringData(dbb);
|
||||
|
||||
PAG_format_header(tdbb);
|
||||
INI_init2(tdbb);
|
||||
|
Loading…
Reference in New Issue
Block a user