@@ -33,10 +33,10 @@ type QueryStats struct {
3333
3434 // Phase tracking fields for timeout classification.
3535 // Stored as UnixNano int64 for atomic operations.
36- queryStart int64 // nanosecond timestamp when query began
37- queryEnd int64 // nanosecond timestamp when query finished
38- queueJoinTime int64 // nanosecond timestamp when request entered scheduler queue
39- queueLeaveTime int64 // nanosecond timestamp when request left scheduler queue
36+ queryStart atomic. Int64 // nanosecond timestamp when query began
37+ queryEnd atomic. Int64 // nanosecond timestamp when query finished
38+ queueJoinTime atomic. Int64 // nanosecond timestamp when request entered scheduler queue
39+ queueLeaveTime atomic. Int64 // nanosecond timestamp when request left scheduler queue
4040}
4141
4242// ContextWithEmptyStats returns a context with empty stats.
@@ -326,7 +326,7 @@ func (s *QueryStats) SetQueryStart(t time.Time) {
326326 return
327327 }
328328
329- atomic . StoreInt64 ( & s .queryStart , t .UnixNano ())
329+ s .queryStart . Store ( t .UnixNano ())
330330}
331331
332332// LoadQueryStart returns the query start time.
@@ -335,7 +335,7 @@ func (s *QueryStats) LoadQueryStart() time.Time {
335335 return time.Time {}
336336 }
337337
338- ns := atomic . LoadInt64 ( & s .queryStart )
338+ ns := s .queryStart . Load ( )
339339 if ns == 0 {
340340 return time.Time {}
341341 }
@@ -348,7 +348,7 @@ func (s *QueryStats) SetQueryEnd(t time.Time) {
348348 return
349349 }
350350
351- atomic . StoreInt64 ( & s .queryEnd , t .UnixNano ())
351+ s .queryEnd . Store ( t .UnixNano ())
352352}
353353
354354// LoadQueryEnd returns the query end time.
@@ -357,7 +357,7 @@ func (s *QueryStats) LoadQueryEnd() time.Time {
357357 return time.Time {}
358358 }
359359
360- ns := atomic . LoadInt64 ( & s .queryEnd )
360+ ns := s .queryEnd . Load ( )
361361 if ns == 0 {
362362 return time.Time {}
363363 }
@@ -370,7 +370,7 @@ func (s *QueryStats) SetQueueJoinTime(t time.Time) {
370370 return
371371 }
372372
373- atomic . StoreInt64 ( & s .queueJoinTime , t .UnixNano ())
373+ s .queueJoinTime . Store ( t .UnixNano ())
374374}
375375
376376// LoadQueueJoinTime returns the queue join time.
@@ -379,7 +379,7 @@ func (s *QueryStats) LoadQueueJoinTime() time.Time {
379379 return time.Time {}
380380 }
381381
382- ns := atomic . LoadInt64 ( & s .queueJoinTime )
382+ ns := s .queueJoinTime . Load ( )
383383 if ns == 0 {
384384 return time.Time {}
385385 }
@@ -392,7 +392,7 @@ func (s *QueryStats) SetQueueLeaveTime(t time.Time) {
392392 return
393393 }
394394
395- atomic . StoreInt64 ( & s .queueLeaveTime , t .UnixNano ())
395+ s .queueLeaveTime . Store ( t .UnixNano ())
396396}
397397
398398// LoadQueueLeaveTime returns the queue leave time.
@@ -401,7 +401,7 @@ func (s *QueryStats) LoadQueueLeaveTime() time.Time {
401401 return time.Time {}
402402 }
403403
404- ns := atomic . LoadInt64 ( & s .queueLeaveTime )
404+ ns := s .queueLeaveTime . Load ( )
405405 if ns == 0 {
406406 return time.Time {}
407407 }
0 commit comments