Skip to content

Commit fd418c6

Browse files
committed
cleanup deadcode
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
1 parent f37d5ac commit fd418c6

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

main.go

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ const (
3535
3636
`
3737

38-
specFile = "config.json"
39-
stateFile = "state.json"
40-
4138
nanoSecondsPerSecond = 1e9
4239
)
4340

@@ -118,16 +115,6 @@ func main() {
118115
}
119116
}
120117

121-
func usageAndExit(message string, exitCode int) {
122-
if message != "" {
123-
fmt.Fprintf(os.Stderr, message)
124-
fmt.Fprintf(os.Stderr, "\n\n")
125-
}
126-
flag.Usage()
127-
fmt.Fprintf(os.Stderr, "\n")
128-
os.Exit(exitCode)
129-
}
130-
131118
func (s *containerStats) collect() {
132119
var (
133120
previousCPU uint64
@@ -175,8 +162,6 @@ func (s *containerStats) collect() {
175162
memLimit = float64(v.Memory.Usage.Limit)
176163
memPercent = calculateMemPercentNoCache(s.MemoryLimit, s.Memory)
177164

178-
//netRx, netTx = calculateNetwork(e.Data.Interfaces)
179-
180165
pidsCurrent = v.Pids.Current
181166

182167
// set the stats
@@ -259,16 +244,6 @@ func calculateBlockIO(blkio types.Blkio) (uint64, uint64) {
259244
return blkRead, blkWrite
260245
}
261246

262-
func calculateNetwork(network []*types.NetworkInterface) (float64, float64) {
263-
var rx, tx float64
264-
265-
for _, v := range network {
266-
rx += float64(v.RxBytes)
267-
tx += float64(v.TxBytes)
268-
}
269-
return rx, tx
270-
}
271-
272247
// calculateMemUsageNoCache calculate memory usage of the container.
273248
// Page cache is intentionally excluded to avoid misinterpretation of the output.
274249
func calculateMemUsageNoCache(mem types.Memory) float64 {

0 commit comments

Comments
 (0)