github.com/ubuntu/ubuntu-report@v1.7.4-0.20240410144652-96f37d845fac/internal/metrics/metricsdata.go (about)

     1  package metrics
     2  
     3  import "encoding/json"
     4  
     5  type metrics struct {
     6  	Version string `json:",omitempty"`
     7  
     8  	OEM *struct {
     9  		Vendor  string
    10  		Product string
    11  		Family  string
    12  		DCD     string `json:",omitempty"`
    13  	} `json:",omitempty"`
    14  	BIOS *struct {
    15  		Vendor  string
    16  		Version string
    17  	} `json:",omitempty"`
    18  	CPU        *cpuInfo     `json:",omitempty"`
    19  	Arch       string       `json:",omitempty"`
    20  	HwCap      string       `json:",omitempty"`
    21  	GPU        []gpuInfo    `json:",omitempty"`
    22  	RAM        *float64     `json:",omitempty"`
    23  	Disks      []float64    `json:",omitempty"`
    24  	Partitions []float64    `json:",omitempty"`
    25  	Screens    []screenInfo `json:",omitempty"`
    26  
    27  	Autologin *bool `json:",omitempty"`
    28  	LivePatch *bool `json:",omitempty"`
    29  	Session   *struct {
    30  		DE   string
    31  		Name string
    32  		Type string
    33  	} `json:",omitempty"`
    34  	Language string `json:",omitempty"`
    35  	Timezone string `json:",omitempty"`
    36  
    37  	Install json.RawMessage `json:",omitempty"`
    38  	Upgrade json.RawMessage `json:",omitempty"`
    39  }
    40  
    41  type gpuInfo struct {
    42  	Vendor string
    43  	Model  string
    44  }
    45  
    46  type screenInfo struct {
    47  	Size       string
    48  	Resolution string
    49  	Frequency  string
    50  }
    51  
    52  type cpuInfo struct {
    53  	OpMode             string
    54  	CPUs               string
    55  	Threads            string
    56  	Cores              string
    57  	Sockets            string
    58  	Vendor             string
    59  	Family             string
    60  	Model              string
    61  	Stepping           string
    62  	Name               string
    63  	Virtualization     string `json:",omitempty"`
    64  	Hypervisor         string `json:",omitempty"`
    65  	VirtualizationType string `json:",omitempty"`
    66  }