github.com/pyroscope-io/pyroscope@v0.37.3-0.20230725203016-5f6947968bd0/pkg/storage/metadata/metadata.go (about)

     1  package metadata
     2  
     3  type Units string
     4  
     5  func (u Units) String() string {
     6  	return string(u)
     7  }
     8  
     9  const (
    10  	SamplesUnits         Units = "samples"
    11  	ObjectsUnits         Units = "objects"
    12  	GoroutinesUnits      Units = "goroutines"
    13  	BytesUnits           Units = "bytes"
    14  	LockNanosecondsUnits Units = "lock_nanoseconds"
    15  	LockSamplesUnits     Units = "lock_samples"
    16  )
    17  
    18  type AggregationType string
    19  
    20  const (
    21  	AverageAggregationType AggregationType = "average"
    22  	SumAggregationType     AggregationType = "sum"
    23  )
    24  
    25  func (a AggregationType) String() string {
    26  	return string(a)
    27  }
    28  
    29  type Metadata struct {
    30  	SpyName         string
    31  	SampleRate      uint32
    32  	Units           Units
    33  	AggregationType AggregationType
    34  }