mirror of
https://github.com/openfaas/faasd.git
synced 2025-06-08 16:06:47 +00:00
Print start-up timings as human-readable approximation
Signed-off-by: Han Verstraete <welteki@pm.me>
This commit is contained in:
parent
e09f37e5cb
commit
7bd84766f3
@ -16,6 +16,7 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
flag "github.com/spf13/pflag"
|
flag "github.com/spf13/pflag"
|
||||||
|
|
||||||
|
units "github.com/docker/go-units"
|
||||||
"github.com/openfaas/faasd/pkg"
|
"github.com/openfaas/faasd/pkg"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -68,7 +69,7 @@ func runUp(cmd *cobra.Command, _ []string) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Printf("Supervisor created in: %s\n", time.Since(start).String())
|
log.Printf("Supervisor created in: %s\n", units.HumanDuration(time.Since(start)))
|
||||||
|
|
||||||
start = time.Now()
|
start = time.Now()
|
||||||
if err := supervisor.Start(services); err != nil {
|
if err := supervisor.Start(services); err != nil {
|
||||||
@ -76,7 +77,7 @@ func runUp(cmd *cobra.Command, _ []string) error {
|
|||||||
}
|
}
|
||||||
defer supervisor.Close()
|
defer supervisor.Close()
|
||||||
|
|
||||||
log.Printf("Supervisor init done in: %s\n", time.Since(start).String())
|
log.Printf("Supervisor init done in: %s\n", units.HumanDuration(time.Since(start)))
|
||||||
|
|
||||||
shutdownTimeout := time.Second * 1
|
shutdownTimeout := time.Second * 1
|
||||||
timeout := time.Second * 60
|
timeout := time.Second * 60
|
||||||
|
Loading…
x
Reference in New Issue
Block a user