mirror of
https://github.com/sot-tech/mochi.git
synced 2026-06-20 03:14:21 -07:00
log flags/gomaxprocs
This commit is contained in:
@@ -30,9 +30,11 @@ func init() {
|
||||
|
||||
func main() {
|
||||
flag.Parse()
|
||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||
glog.Info("parsed flags")
|
||||
|
||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||
glog.Info("set gomaxprocs to ", runtime.NumCPU())
|
||||
|
||||
// Enable the profile if flagged.
|
||||
if profile {
|
||||
f, err := os.Create("chihaya.cpu")
|
||||
if err != nil {
|
||||
@@ -49,7 +51,6 @@ func main() {
|
||||
}()
|
||||
}
|
||||
|
||||
// Load the config file.
|
||||
cfg, err := config.Open(configPath)
|
||||
if err != nil {
|
||||
glog.Fatalf("failed to parse configuration file: %s\n", err)
|
||||
@@ -60,7 +61,6 @@ func main() {
|
||||
glog.Infof("loaded config file: %s", configPath)
|
||||
}
|
||||
|
||||
// Start the server listening and handling requests.
|
||||
http.Serve(cfg)
|
||||
glog.Info("gracefully shutdown")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user