Skip to content

Commit

Permalink
feat: parity in module-id
Browse files Browse the repository at this point in the history
  • Loading branch information
Hardikl committed Jan 9, 2025
1 parent 1f668e8 commit 8cc7ae7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/collectors/zapiperf/plugins/disk/disk.go
Original file line number Diff line number Diff line change
Expand Up @@ -882,6 +882,11 @@ func (d *Disk) handleCMode(shelves []*node.Node) ([]*matrix.Matrix, error) {

for label, labelDisplay := range d.instanceLabels[attribute] {
if value := obj.GetChildContentS(label); value != "" {
// This is to parity with rest for modules, Convert A -> 0, B -> 1 in zapi
if attribute == "shelf-modules" && len(value) == 1 {
num := int(value[0] - 'A')
value = strconv.Itoa(num)
}
instance.SetLabel(labelDisplay, value)
}
}
Expand Down

0 comments on commit 8cc7ae7

Please sign in to comment.