github.com/NVIDIA/aistore@v1.3.23-0.20240517131212-7df6609be51d/cmn/cos/stats.go (about)

     1  // Package cos provides common low-level types and utilities for all aistore projects
     2  /*
     3   * Copyright (c) 2018-2023, NVIDIA CORPORATION. All rights reserved.
     4   */
     5  package cos
     6  
     7  // TODO: try resolve transport -> stats cyclic dep and move => stats/api.go
     8  
     9  type (
    10  	StatsUpdater interface {
    11  		Inc(name string)
    12  		Add(name string, val int64)
    13  		Get(name string) int64
    14  		AddMany(namedVal64 ...NamedVal64)
    15  	}
    16  	NamedVal64 struct {
    17  		Name       string
    18  		NameSuffix string // forces immediate send when non-empty
    19  		Value      int64
    20  	}
    21  )