MCPcopy Index your code
hub / github.com/GoEdgeLab/EdgeNode / sum

Method sum

internal/metrics/task_sqlite.go:491–506  ·  view source on GitHub ↗

计算数量和综合

(serverId int64, time string)

Source from the content-addressed store, hash-verified

489
490// 计算数量和综合
491func (this *SQLiteTask) sum(serverId int64, time string) (count int64, total float64, err error) {
492 rows, err := this.sumStmt.Query(serverId, this.itemConfig.Version, time)
493 if err != nil {
494 return 0, 0, err
495 }
496 defer func() {
497 _ = rows.Close()
498 }()
499 if rows.Next() {
500 err = rows.Scan(&count, &total)
501 if err != nil {
502 return 0, 0, err
503 }
504 }
505 return
506}

Callers 1

UploadMethod · 0.95

Calls 3

NextMethod · 0.80
CloseMethod · 0.65
QueryMethod · 0.45

Tested by

no test coverage detected