Skip to content

Commit

Permalink
replace camelCase with underscore
Browse files Browse the repository at this point in the history
  • Loading branch information
alexei-led committed May 18, 2023
1 parent c051101 commit c7eaba9
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 32 deletions.
20 changes: 10 additions & 10 deletions internal/usage/record.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type Allocation struct {
// storage fraction of total storage
Storage float64 `json:"storage,omitempty"`
// ephemeral storage fraction of total ephemeral storage
StorageEphemeral float64 `json:"storageEphemeral,omitempty"`
StorageEphemeral float64 `json:"storage_ephemeral,omitempty"`
}

type Allocations struct {
Expand All @@ -39,7 +39,7 @@ type Ask struct {
CPU int64 `json:"cpu,omitempty"`
Memory int64 `json:"memory,omitempty"`
Storage int64 `json:"storage,omitempty"`
StorageEphemeral int64 `json:"storageEphemeral,omitempty"`
StorageEphemeral int64 `json:"storage_ephemeral,omitempty"`
GPU int64 `json:"gpu,omitempty"`
}

Expand All @@ -60,7 +60,7 @@ type Capacity struct {
// local storage in Kibibytes
Storage int64 `json:"storage,omitempty"`
// ephemeral storage in Kibibytes
StorageEphemeral int64 `json:"storageEphemeral,omitempty"`
StorageEphemeral int64 `json:"storage_ephemeral,omitempty"`
}

type NodeInfo struct {
Expand All @@ -70,14 +70,14 @@ type NodeInfo struct {
Nodegroup string `json:"nodegroup,omitempty"`
InstanceType string `json:"type,omitempty"`
// ComputeType: fargate or ec2
ComputeType string `json:"computeType,omitempty"`
ComputeType string `json:"compute_type,omitempty"`
// CapacityType: SPOT or ON_DEMAND
CapacityType string `json:"capacityType,omitempty"`
CapacityType string `json:"capacity_type,omitempty"`
Region string `json:"region"`
Zone string `json:"zone"`
Arch string `json:"arch"`
OS string `json:"os"`
OSImage string `json:"osImage"`
OSImage string `json:"os_image"`
KernelVersion string `json:"kernel"`
KubeletVersion string `json:"kubelet"`
Runtime string `json:"runtime"`
Expand All @@ -91,10 +91,10 @@ type PodInfo struct {
Namespace string `json:"namespace"`
Labels map[string]string `json:"labels,omitempty"`
Node NodeInfo `json:"node"`
QosClass string `json:"qosClass"`
StartTime time.Time `json:"startTime"`
BeginTime time.Time `json:"beginTime"`
EndTime time.Time `json:"endTime"`
QosClass string `json:"qos_class"`
StartTime time.Time `json:"start_time"`
BeginTime time.Time `json:"begin_time"`
EndTime time.Time `json:"end_time"`
Resources Resources `json:"resources,omitempty"`
Allocations Allocations `json:"allocations,omitempty"`
}
Expand Down
44 changes: 22 additions & 22 deletions schema/schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"type": "record",
"name": "PodInfo",
"name": "pod_info",
"fields": [
{
"name": "name",
Expand All @@ -21,7 +21,7 @@
"name": "node",
"type": {
"type": "record",
"name": "Node",
"name": "node",
"fields": [
{
"name": "id",
Expand All @@ -44,11 +44,11 @@
"type": "string"
},
{
"name": "computeType",
"name": "compute_type",
"type": "string"
},
{
"name": "capacityType",
"name": "capacity_type",
"type": "string"
},
{
Expand All @@ -68,7 +68,7 @@
"type": "string"
},
{
"name": "osImage",
"name": "os_image",
"type": "string"
},
{
Expand All @@ -87,7 +87,7 @@
"name": "allocatable",
"type": {
"type": "record",
"name": "Allocatable",
"name": "allocatable",
"fields": [
{
"name": "cpu",
Expand All @@ -113,7 +113,7 @@
"default": 0
},
{
"name": "storageEphemeral",
"name": "storage_ephemeral",
"type": "long",
"default": 0
}
Expand Down Expand Up @@ -150,7 +150,7 @@
"default": 0
},
{
"name": "storageEphemeral",
"name": "storage_ephemeral",
"type": "long",
"default": 0
}
Expand All @@ -168,26 +168,26 @@
}
},
{
"name": "qosClass",
"name": "qos_class",
"type": "string",
"default": "BestEffort"
},
{
"name": "startTime",
"name": "start_time",
"type": {
"type": "string",
"logicalType": "timestamp-millis"
}
},
{
"name": "beginTime",
"name": "begin_time",
"type": {
"type": "string",
"logicalType": "timestamp-millis"
}
},
{
"name": "endTime",
"name": "end_time",
"type": {
"type": "string",
"logicalType": "timestamp-millis"
Expand All @@ -197,13 +197,13 @@
"name": "resources",
"type": {
"type": "record",
"name": "Resources",
"name": "resources",
"fields": [
{
"name": "limits",
"type": {
"type": "record",
"name": "Limits",
"name": "limits",
"fields": [
{
"name": "cpu",
Expand All @@ -226,7 +226,7 @@
"default": 0
},
{
"name": "storageEphemeral",
"name": "storage_ephemeral",
"type": "long",
"default": 0
}
Expand All @@ -237,7 +237,7 @@
"name": "requests",
"type": {
"type": "record",
"name": "Requests",
"name": "requests",
"fields": [
{
"name": "cpu",
Expand All @@ -260,7 +260,7 @@
"default": 0
},
{
"name": "storageEphemeral",
"name": "storage_ephemeral",
"type": "long",
"default": 0
}
Expand All @@ -274,13 +274,13 @@
"name": "allocations",
"type": {
"type": "record",
"name": "Allocations",
"name": "allocations",
"fields": [
{
"name": "limits",
"type": {
"type": "record",
"name": "AllocationLimits",
"name": "allocation_imits",
"fields": [
{
"name": "cpu",
Expand All @@ -301,7 +301,7 @@
"default": 0
},
{
"name": "storageEphemeral",
"name": "storage_ephemeral",
"type": "double",
"default": 0
}
Expand All @@ -312,7 +312,7 @@
"name": "requests",
"type": {
"type": "record",
"name": "AllocationRequests",
"name": "allocation_requests",
"fields": [
{
"name": "cpu",
Expand All @@ -333,7 +333,7 @@
"default": 0
},
{
"name": "storageEphemeral",
"name": "storage_ephemeral",
"type": "double",
"default": 0
}
Expand Down

0 comments on commit c7eaba9

Please sign in to comment.