stats.go 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. package intelrdt
  2. type L3CacheInfo struct {
  3. CbmMask string `json:"cbm_mask,omitempty"`
  4. MinCbmBits uint64 `json:"min_cbm_bits,omitempty"`
  5. NumClosids uint64 `json:"num_closids,omitempty"`
  6. }
  7. type MemBwInfo struct {
  8. BandwidthGran uint64 `json:"bandwidth_gran,omitempty"`
  9. DelayLinear uint64 `json:"delay_linear,omitempty"`
  10. MinBandwidth uint64 `json:"min_bandwidth,omitempty"`
  11. NumClosids uint64 `json:"num_closids,omitempty"`
  12. }
  13. type MBMNumaNodeStats struct {
  14. // The 'mbm_total_bytes' in 'container_id' group.
  15. MBMTotalBytes uint64 `json:"mbm_total_bytes"`
  16. // The 'mbm_local_bytes' in 'container_id' group.
  17. MBMLocalBytes uint64 `json:"mbm_local_bytes"`
  18. }
  19. type CMTNumaNodeStats struct {
  20. // The 'llc_occupancy' in 'container_id' group.
  21. LLCOccupancy uint64 `json:"llc_occupancy"`
  22. }
  23. type Stats struct {
  24. // The read-only L3 cache information
  25. L3CacheInfo *L3CacheInfo `json:"l3_cache_info,omitempty"`
  26. // The read-only L3 cache schema in root
  27. L3CacheSchemaRoot string `json:"l3_cache_schema_root,omitempty"`
  28. // The L3 cache schema in 'container_id' group
  29. L3CacheSchema string `json:"l3_cache_schema,omitempty"`
  30. // The read-only memory bandwidth information
  31. MemBwInfo *MemBwInfo `json:"mem_bw_info,omitempty"`
  32. // The read-only memory bandwidth schema in root
  33. MemBwSchemaRoot string `json:"mem_bw_schema_root,omitempty"`
  34. // The memory bandwidth schema in 'container_id' group
  35. MemBwSchema string `json:"mem_bw_schema,omitempty"`
  36. // The memory bandwidth monitoring statistics from NUMA nodes in 'container_id' group
  37. MBMStats *[]MBMNumaNodeStats `json:"mbm_stats,omitempty"`
  38. // The cache monitoring technology statistics from NUMA nodes in 'container_id' group
  39. CMTStats *[]CMTNumaNodeStats `json:"cmt_stats,omitempty"`
  40. }
  41. func newStats() *Stats {
  42. return &Stats{}
  43. }