File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -201,8 +201,8 @@ func (a *Aperture) Start(errChan chan error) error {
201
201
}
202
202
203
203
// Enable http profiling and validate profile port number if requested.
204
- if a .cfg .ProfilePort != 0 {
205
- if a .cfg .ProfilePort < 1024 || a .cfg .ProfilePort > 65535 {
204
+ if a .cfg .Profile != 0 {
205
+ if a .cfg .Profile < 1024 || a .cfg .Profile > 65535 {
206
206
return fmt .Errorf ("the profile port must be between " +
207
207
"1024 and 65535" )
208
208
}
@@ -212,9 +212,7 @@ func (a *Aperture) Start(errChan chan error) error {
212
212
"/debug/pprof" , http .StatusSeeOther ,
213
213
))
214
214
215
- listenAddr := fmt .Sprintf (
216
- "localhost:%d" , a .cfg .ProfilePort ,
217
- )
215
+ listenAddr := fmt .Sprintf ("localhost:%d" , a .cfg .Profile )
218
216
219
217
log .Infof ("Starting profile server at %s" , listenAddr )
220
218
fmt .Println (http .ListenAndServe (listenAddr , nil ))
Original file line number Diff line number Diff line change @@ -200,8 +200,8 @@ type Config struct {
200
200
// BaseDir is a custom directory to store all aperture flies.
201
201
BaseDir string `long:"basedir" description:"Directory to place all of aperture's files in."`
202
202
203
- // ProfilePort is the port on which the pprof profile will be served.
204
- ProfilePort uint16 `long:"profile" description:"Enable HTTP profiling on given port -- NOTE port must be between 1024 and 65535"`
203
+ // Profile is the port on which the pprof profile will be served.
204
+ Profile uint16 `long:"profile" description:"Enable HTTP profiling on given port -- NOTE port must be between 1024 and 65535"`
205
205
}
206
206
207
207
func (c * Config ) validate () error {
You can’t perform that action at this time.
0 commit comments