Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pkg/envinfo/cgroup_linux.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//go:build linux

/*
* Copyright 2024 The CNAI Authors
* Copyright 2024 The ModelPack Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -14,8 +16,6 @@
* limitations under the License.
*/

//go:build linux

package envinfo

import (
Expand Down
6 changes: 3 additions & 3 deletions pkg/envinfo/cgroup_linux_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//go:build linux

/*
* Copyright 2024 The CNAI Authors
* Copyright 2024 The ModelPack Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -14,8 +16,6 @@
* limitations under the License.
*/

//go:build linux

package envinfo

import (
Expand Down
6 changes: 3 additions & 3 deletions pkg/envinfo/cgroup_other.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//go:build !linux

/*
* Copyright 2024 The CNAI Authors
* Copyright 2024 The ModelPack Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -14,8 +16,6 @@
* limitations under the License.
*/

//go:build !linux

package envinfo

// logCgroupInfo is a no-op on non-Linux platforms.
Expand Down
2 changes: 1 addition & 1 deletion pkg/envinfo/envinfo.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2024 The CNAI Authors
* Copyright 2024 The ModelPack Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion pkg/envinfo/envinfo_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2024 The CNAI Authors
* Copyright 2024 The ModelPack Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion pkg/iometrics/format.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2024 The CNAI Authors
* Copyright 2024 The ModelPack Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion pkg/iometrics/reader.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2024 The CNAI Authors
* Copyright 2024 The ModelPack Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
16 changes: 8 additions & 8 deletions pkg/iometrics/tracker.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2024 The CNAI Authors
* Copyright 2024 The ModelPack Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -112,13 +112,13 @@ func (t *Tracker) Summary() {

// Log structured fields to log file.
logrus.WithFields(logrus.Fields{
"operation": t.operation,
"totalBytes": humanize.IBytes(uint64(totalBytes)),
"wallClock": wallClock.Round(time.Millisecond).String(),
"effectiveThroughput": formatThroughput(totalBytes, wallClock),
t.sourceLabel(): sourceThroughput,
t.sinkLabel(): sinkThroughput,
"bottleneck": bottleneck,
"operation": t.operation,
"totalBytes": humanize.IBytes(uint64(totalBytes)),
"wallClock": wallClock.Round(time.Millisecond).String(),
"effectiveThroughput": formatThroughput(totalBytes, wallClock),
t.sourceLabel(): sourceThroughput,
t.sinkLabel(): sinkThroughput,
"bottleneck": bottleneck,
}).Info("io throughput summary")

// Print concise summary to terminal.
Expand Down
2 changes: 1 addition & 1 deletion pkg/iometrics/tracker_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2024 The CNAI Authors
* Copyright 2024 The ModelPack Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down