Skip to content

Commit

Permalink
fix names
Browse files Browse the repository at this point in the history
  • Loading branch information
sgmonroy committed Sep 23, 2019
1 parent c01f5bd commit 1f15142
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion go/border/internal/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ type IntfLabels struct {

// Labels returns the list of labels.
func (l IntfLabels) Labels() []string {
return []string{"interface"}
return []string{"intf"}
}

// Values returns the label values in the order defined by Labels.
Expand Down
6 changes: 3 additions & 3 deletions go/border/internal/metrics/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ type ProcessLabels struct {
// Result is the outcome of processing the packet.
Result string
// In is the input SCION interface.
In string
IntfIn string
// Out is the output SCION interface.
Out string
IntfOut string
}

// Labels returns the list of labels.
Expand All @@ -43,7 +43,7 @@ func (l ProcessLabels) Labels() []string {

// Values returns the label values in the order defined by Labels.
func (l ProcessLabels) Values() []string {
return []string{l.Result, l.In, l.Out}
return []string{l.Result, l.IntfIn, l.IntfOut}
}

type process struct {
Expand Down
2 changes: 1 addition & 1 deletion go/border/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func (r *Router) processPacket(rp *rpkt.RtrPkt) {
}
}
l := metrics.ProcessLabels{
In: metrics.IntfToLabel(rp.Ingress.IfID),
IntfIn: metrics.IntfToLabel(rp.Ingress.IfID),
}
// Assign a pseudorandom ID to the packet, for correlating log entries.
rp.Id = log.RandId(4)
Expand Down
4 changes: 2 additions & 2 deletions go/border/rpkt/route.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ func (rp *RtrPkt) Route() error {
}
l := metrics.ProcessLabels{
Result: metrics.Success,
In: rp.Ingress.IfLabel,
IntfIn: rp.Ingress.IfLabel,
}
rp.RefInc(len(rp.Egress))
// Call all egress functions.
for _, epair := range rp.Egress {
epair.S.Ring.Write(ringbuf.EntryList{&EgressRtrPkt{rp, epair.Dst}}, true)
l.Out = epair.S.Label
l.IntfOut = epair.S.Label
metrics.Process.Pkts(l).Inc()
}
return nil
Expand Down

0 comments on commit 1f15142

Please sign in to comment.