MCPcopy Create free account
hub / github.com/apache/impala / UpdateEndTime

Method UpdateEndTime

be/src/service/client-request-state.cc:2200–2211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2198}
2199
2200void ClientRequestState::UpdateEndTime() {
2201 // Update the query's end time only if it isn't set previously.
2202 if (end_time_us_.CompareAndSwap(0, UnixMicros())) {
2203 // Certain API clients expect Start Time and End Time to be date-time strings
2204 // of nanosecond precision, so we explicitly specify the precision here.
2205 summary_profile_->AddInfoString(
2206 "End Time", ToStringFromUnixMicros(end_time_us(), TimePrecision::Nanosecond));
2207 int64_t duration = end_time_us() - start_time_us();
2208 summary_profile_->AddInfoString("Duration", Substitute("$0 ($1 us)",
2209 PrettyPrinter::Print(duration, TUnit::TIME_US), duration));
2210 }
2211}
2212
2213int64_t ClientRequestState::GetTransactionId() const {
2214 DCHECK(InTransaction());

Callers 1

Calls 4

UnixMicrosFunction · 0.85
SubstituteFunction · 0.85
AddInfoStringMethod · 0.80
CompareAndSwapMethod · 0.45

Tested by

no test coverage detected