MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / Truncate

Method Truncate

internal/metrics/task_kv.go:405–412  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

403}
404
405func (this *KVTask) Truncate() error {
406 var db = this.itemsTable.DB()
407 err := db.Truncate()
408 if err != nil {
409 return err
410 }
411 return db.Store().Flush()
412}
413
414func (this *KVTask) uploadServerStats(rpcClient *rpc.RPCClient, serverId int64, currentTime string) (countValues int, uploadErr error) {
415 var pbStats []*pb.UploadingMetricStat

Callers 2

TestKVTask_TruncateFunction · 0.45
DeleteMethod · 0.45

Calls 3

DBMethod · 0.80
StoreMethod · 0.80
FlushMethod · 0.65

Tested by 1

TestKVTask_TruncateFunction · 0.36