| 4288 | |
| 4289 | |
| 4290 | void TraceSweepEvent::report(ntrace_process_state_t state) |
| 4291 | { |
| 4292 | Attachment* att = m_tdbb->getAttachment(); |
| 4293 | |
| 4294 | const SINT64 finiTime = fb_utils::query_performance_counter() - m_start_clock; |
| 4295 | |
| 4296 | if (state == ITracePlugin::SWEEP_STATE_FINISHED) |
| 4297 | { |
| 4298 | const SINT64 timeMs = finiTime * 1000 / fb_utils::query_performance_frequency(); |
| 4299 | |
| 4300 | gds__log("Sweep is finished\n" |
| 4301 | "\tDatabase \"%s\" \n" |
| 4302 | "\t%i workers, time %" SLONGFORMAT ".%03d sec \n" |
| 4303 | "\tOIT %" SQUADFORMAT", OAT %" SQUADFORMAT", OST %" SQUADFORMAT", Next %" SQUADFORMAT, |
| 4304 | att->att_filename.c_str(), |
| 4305 | att->att_parallel_workers, |
| 4306 | (int) timeMs / 1000, (unsigned int) timeMs % 1000, |
| 4307 | m_sweep_info.getOIT(), |
| 4308 | m_sweep_info.getOAT(), |
| 4309 | m_sweep_info.getOST(), |
| 4310 | m_sweep_info.getNext()); |
| 4311 | } |
| 4312 | |
| 4313 | if (!m_need_trace) |
| 4314 | return; |
| 4315 | |
| 4316 | Database* dbb = m_tdbb->getDatabase(); |
| 4317 | TraceManager* trace_mgr = att->att_trace_manager; |
| 4318 | |
| 4319 | TraceConnectionImpl conn(att); |
| 4320 | |
| 4321 | // we need to compare stats against zero base |
| 4322 | if (state != ITracePlugin::SWEEP_STATE_PROGRESS) |
| 4323 | m_base_stats.reset(); |
| 4324 | |
| 4325 | jrd_tra* tran = m_tdbb->getTransaction(); |
| 4326 | |
| 4327 | TraceRuntimeStats stats(att, &m_base_stats, &att->att_stats, finiTime, 0); |
| 4328 | |
| 4329 | m_sweep_info.setPerf(stats.getPerf()); |
| 4330 | trace_mgr->event_sweep(&conn, &m_sweep_info, state); |
| 4331 | |
| 4332 | if (state == ITracePlugin::SWEEP_STATE_FAILED || state == ITracePlugin::SWEEP_STATE_FINISHED) |
| 4333 | m_need_trace = false; |
| 4334 | } |
| 4335 | |
| 4336 | SecDbContext::SecDbContext(IAttachment* a, ITransaction* t) |
| 4337 | : att(a), tra(t), savePoint(0) |
nothing calls this directly
no test coverage detected