mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 20:43:04 +01:00
Reset the statistics for every sub-request (aka call) execution.
This commit is contained in:
parent
8f806ef115
commit
7903960607
@ -56,6 +56,11 @@ SINT64 RuntimeStatistics::getValue(size_t index) const
|
|||||||
return values[index];
|
return values[index];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RuntimeStatistics::reset()
|
||||||
|
{
|
||||||
|
memset(values.begin(), 0, values.getCount() * sizeof(SINT64));
|
||||||
|
}
|
||||||
|
|
||||||
void RuntimeStatistics::bumpValue(thread_db* tdbb, size_t index)
|
void RuntimeStatistics::bumpValue(thread_db* tdbb, size_t index)
|
||||||
{
|
{
|
||||||
fb_assert(tdbb);
|
fb_assert(tdbb);
|
||||||
|
@ -61,6 +61,7 @@ public:
|
|||||||
|
|
||||||
void setParent(RuntimeStatistics*);
|
void setParent(RuntimeStatistics*);
|
||||||
SINT64 getValue(size_t) const;
|
SINT64 getValue(size_t) const;
|
||||||
|
void reset();
|
||||||
|
|
||||||
static void bumpValue(thread_db*, size_t);
|
static void bumpValue(thread_db*, size_t);
|
||||||
|
|
||||||
|
@ -672,6 +672,7 @@ jrd_req* EXE_find_request(thread_db* tdbb, jrd_req* request, bool validate)
|
|||||||
}
|
}
|
||||||
clone->req_attachment = tdbb->tdbb_attachment;
|
clone->req_attachment = tdbb->tdbb_attachment;
|
||||||
clone->req_stats.setParent(&tdbb->tdbb_attachment->att_stats);
|
clone->req_stats.setParent(&tdbb->tdbb_attachment->att_stats);
|
||||||
|
clone->req_stats.reset();
|
||||||
clone->req_flags |= req_in_use;
|
clone->req_flags |= req_in_use;
|
||||||
dbb->dbb_mutexes[DBB_MUTX_clone].leave();
|
dbb->dbb_mutexes[DBB_MUTX_clone].leave();
|
||||||
return clone;
|
return clone;
|
||||||
|
Loading…
Reference in New Issue
Block a user