File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -61,18 +61,18 @@ const RUN_NUMBER = 50
61
61
62
62
func main () {
63
63
64
- if ProfileMode != "" {
65
-
66
- switch ProfileMode {
67
- case "mem " :
68
- defer profile .Start (profile .MemProfile , profile .ProfilePath ("." ), profile . MemProfileRate ( 1 )).Stop ()
69
- case "cpu" :
70
- defer profile . Start ( profile . CPUProfile , profile . ProfilePath ( "." )). Stop ( )
71
- }
72
-
73
- for i := 0 ; i < RUN_NUMBER ; i ++ {
74
- stressTest ()
75
- }
64
+ switch ProfileMode {
65
+ case "mem" :
66
+ defer profile . Start ( profile . MemProfile , profile . ProfilePath ( "." ), profile . MemProfileRate ( 1 )). Stop ()
67
+ case "cpu " :
68
+ defer profile .Start (profile .CPUProfile , profile .ProfilePath ("." )).Stop ()
69
+ default :
70
+ log . Println ( "ProfileMode should be set to mem or cpu" )
71
+
72
+ }
73
+
74
+ for i := 0 ; i < RUN_NUMBER ; i ++ {
75
+ stressTest ()
76
76
}
77
77
78
78
}
You can’t perform that action at this time.
0 commit comments