mirror of
https://github.com/minio/minio.git
synced 2026-06-04 10:13:48 +08:00
Add Profiler Admin API (#6463)
Two handlers are added to admin API to enable profiling and disable
profiling of a server in a standalone mode, or all nodes in the
distributed mode.
/minio/admin/profiling/start/{cpu,block,mem}:
- Start profiling and return starting JSON results, e.g. one
node is offline.
/minio/admin/profiling/download:
- Stop the on-going profiling task
- Stream a zip file which contains all profiling files that can
be later inspected by go tool pprof
This commit is contained in:
+3
-2
@@ -228,8 +228,9 @@ func TestURL2BucketObjectName(t *testing.T) {
|
||||
|
||||
// Add tests for starting and stopping different profilers.
|
||||
func TestStartProfiler(t *testing.T) {
|
||||
if startProfiler("") != nil {
|
||||
t.Fatal("Expected nil, but non-nil value returned for invalid profiler.")
|
||||
_, err := startProfiler("", "")
|
||||
if err == nil {
|
||||
t.Fatal("Expected a non nil error, but nil error returned for invalid profiler.")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user