github.com/NVIDIA/aistore@v1.3.23-0.20240517131212-7df6609be51d/api/apc/bsummary.go (about)

     1  // Package apc: API control messages and constants
     2  /*
     3   * Copyright (c) 2018-2024, NVIDIA CORPORATION. All rights reserved.
     4   */
     5  package apc
     6  
     7  type (
     8  	// to generate bucket summary (or summaries)
     9  	BsummCtrlMsg struct {
    10  		UUID          string `json:"uuid"`
    11  		Prefix        string `json:"prefix"`
    12  		ObjCached     bool   `json:"cached"`
    13  		BckPresent    bool   `json:"present"`
    14  		DontAddRemote bool   `json:"dont_add_remote"`
    15  	}
    16  
    17  	// "summarized" result for a given bucket
    18  	BsummResult struct {
    19  		ObjCount struct {
    20  			Present uint64 `json:"obj_count_present,string"`
    21  			Remote  uint64 `json:"obj_count_remote,string"`
    22  		}
    23  		ObjSize struct {
    24  			Min int64 `json:"obj_min_size"`
    25  			Avg int64 `json:"obj_avg_size"`
    26  			Max int64 `json:"obj_max_size"`
    27  		}
    28  		TotalSize struct {
    29  			OnDisk      uint64 `json:"size_on_disk,string"`          // sum(dir sizes) aka "apparent size"
    30  			PresentObjs uint64 `json:"size_all_present_objs,string"` // sum(cached object sizes)
    31  			RemoteObjs  uint64 `json:"size_all_remote_objs,string"`  // sum(all object sizes in a remote bucket)
    32  			Disks       uint64 `json:"total_disks_size,string"`
    33  		}
    34  		UsedPct      uint64 `json:"used_pct"`
    35  		IsBckPresent bool   `json:"is_present"` // in BMD
    36  	}
    37  )