Add storage count debug statement.
This commit is contained in:

committed by
Sebastian Serth

parent
6ddc6493d4
commit
770327cf64
@ -3,11 +3,14 @@ package storage
|
||||
import (
|
||||
influxdb2 "github.com/influxdata/influxdb-client-go/v2"
|
||||
"github.com/influxdata/influxdb-client-go/v2/api/write"
|
||||
"github.com/openHPI/poseidon/pkg/logging"
|
||||
"github.com/openHPI/poseidon/pkg/monitoring"
|
||||
"strconv"
|
||||
"sync"
|
||||
)
|
||||
|
||||
var log = logging.GetLogger("storage")
|
||||
|
||||
// Storage is an interface for storing objects.
|
||||
type Storage[T any] interface {
|
||||
// List returns all objects from the storage.
|
||||
@ -135,7 +138,9 @@ func (s *localStorage[T]) Length() uint {
|
||||
}
|
||||
|
||||
func (s *localStorage[T]) unsafeLength() uint {
|
||||
return uint(len(s.objects))
|
||||
length := len(s.objects)
|
||||
log.WithField("length_int", length).WithField("length_uint", uint(length)).Debug("Storage info")
|
||||
return uint(length)
|
||||
}
|
||||
|
||||
func (s *localStorage[T]) sendMonitoringData(id string, o T, isDeletion bool, count uint) {
|
||||
|
Reference in New Issue
Block a user