Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add go runtime profile type #5098

Merged
merged 4 commits into from
Jan 2, 2025
Merged
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
1 change: 1 addition & 0 deletions cmd/admin-service-restart.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ func mainAdminServiceRestart(ctx *cli.Context) error {
})
if e != nil {
// Attempt an older API server might be old
//nolint:staticcheck
e = client.ServiceRestart(ctxt)
}
fatalIf(probe.NewError(e), "Unable to restart the server.")
Expand Down
4 changes: 2 additions & 2 deletions cmd/admin-service-unfreeze.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func checkAdminServiceUnfreezeSyntax(ctx *cli.Context) {
}

func mainAdminServiceUnfreeze(ctx *cli.Context) error {
// Validate serivce unfreeze syntax.
// Validate service unfreeze syntax.
checkAdminServiceUnfreezeSyntax(ctx)

// Set color.
Expand All @@ -89,7 +89,7 @@ func mainAdminServiceUnfreeze(ctx *cli.Context) error {
fatalIf(err, "Unable to initialize admin connection.")

// Unfreeze the specified MinIO server
fatalIf(probe.NewError(client.ServiceUnfreeze(globalContext)), "Unable to unfreeze the server.")
fatalIf(probe.NewError(client.ServiceUnfreezeV2(globalContext)), "Unable to unfreeze the server.")

// Success..
printMsg(serviceUnfreezeCommand{Status: "success", ServerURL: aliasedURL})
Expand Down
2 changes: 1 addition & 1 deletion cmd/client-fs_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ func IsDeleteEvent(event notify.Event) bool {

// getAllXattrs returns the extended attributes for a file if supported
// by the OS
func getAllXattrs(path string) (map[string]string, error) {
func getAllXattrs(_ string) (map[string]string, error) {
return nil, nil
}
8 changes: 5 additions & 3 deletions cmd/support-profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ func checkAdminProfileSyntax(ctx *cli.Context) {
string(madmin.ProfilerTrace),
string(madmin.ProfilerThreads),
string(madmin.ProfilerGoroutines),
string(madmin.ProfilerCPUIO))
string(madmin.ProfilerCPUIO),
string(madmin.ProfilerRuntime),
)
// Check if the provided profiler type is known and supported
profilers := strings.Split(strings.ToLower(ctx.String("type")), ",")
for _, profiler := range profilers {
Expand All @@ -134,8 +136,8 @@ func checkAdminProfileSyntax(ctx *cli.Context) {
showCommandHelpAndExit(ctx, 1) // last argument is exit code
}

if ctx.Int("duration") < 10 {
fatal(errDummy().Trace(), "for any useful profiling one must run it for atleast 10 seconds")
if ctx.Int("duration") < 1 {
fatal(errDummy().Trace(), "for any useful profiling one must run it for at least 1 second")
}
}

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ require (
github.com/minio/cli v1.24.2
github.com/minio/colorjson v1.0.8
github.com/minio/filepath v1.0.0
github.com/minio/madmin-go/v3 v3.0.78
github.com/minio/madmin-go/v3 v3.0.82-0.20241219154017-7a6a137d7ed6
github.com/minio/minio-go/v7 v7.0.82
github.com/minio/pkg/v3 v3.0.23
github.com/minio/selfupdate v0.6.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ github.com/minio/colorjson v1.0.8 h1:AS6gEQ1dTRYHmC4xuoodPDRILHP/9Wz5wYUGDQfPLpg
github.com/minio/colorjson v1.0.8/go.mod h1:wrs39G/4kqNlGjwqHvPlAnXuc2tlPszo6JKdSBCLN8w=
github.com/minio/filepath v1.0.0 h1:fvkJu1+6X+ECRA6G3+JJETj4QeAYO9sV43I79H8ubDY=
github.com/minio/filepath v1.0.0/go.mod h1:/nRZA2ldl5z6jT9/KQuvZcQlxZIMQoFFQPvEXx9T/Bw=
github.com/minio/madmin-go/v3 v3.0.78 h1:JHUZU8akWSu8UF+mIBpsOSLtOG9b4ZTZVz3TShLbYn4=
github.com/minio/madmin-go/v3 v3.0.78/go.mod h1:IZOL4lEMiJ4QN2iWQjkOIIthcVuNYU7ENF7RkyxlzKY=
github.com/minio/madmin-go/v3 v3.0.82-0.20241219154017-7a6a137d7ed6 h1:ftB3HcXyqxWWN+WoqSSy5K+4muzvq+aMtdtu9zMLyCg=
github.com/minio/madmin-go/v3 v3.0.82-0.20241219154017-7a6a137d7ed6/go.mod h1:QAZPX3xx4gdZbZ8t85SieFSwXMOQhFx7bVjldhyc6Bk=
github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34=
github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM=
github.com/minio/minio-go/v7 v7.0.82 h1:tWfICLhmp2aFPXL8Tli0XDTHj2VB/fNf0PC1f/i1gRo=
Expand Down
2 changes: 1 addition & 1 deletion pkg/disk/stat_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ package disk

// GetFileSystemAttrs return the file system attribute as string; containing mode,
// uid, gid, uname, Gname, atime, mtime, ctime and md5
func GetFileSystemAttrs(file string) (string, error) {
func GetFileSystemAttrs(_ string) (string, error) {
return "", nil
}
Loading