Skip to content

Commit

Permalink
Merge pull request #739 from Fenny/master
Browse files Browse the repository at this point in the history
📦 bump dependencies
  • Loading branch information
Fenny authored Aug 24, 2020
2 parents 5ee927d + f3359f4 commit 7a152c2
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
14 changes: 9 additions & 5 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
)

// Version of current package
const Version = "1.14.2"
const Version = "1.14.3"

// Map is a shortcut for map[string]interface{}, useful for JSON returns
type Map map[string]interface{}
Expand Down Expand Up @@ -671,18 +671,22 @@ func (app *App) startupMessage(addr string, tls bool, pids string) {
host, port := parseAddr(addr)
var (
tlsStr = "FALSE"
preforkStr = "FALSE"
handlerCount = app.handlerCount
osName = utils.ToUpper(runtime.GOOS)
memTotal = utils.ByteSize(utils.MemoryTotal())
cpuThreads = runtime.NumCPU()
pid = os.Getpid()

cpuThreads = runtime.NumCPU()
pid = os.Getpid()
)
if host == "" {
host = "0.0.0.0"
}
if tls {
tlsStr = "TRUE"
}
if app.Settings.Prefork {
preforkStr = "TRUE"
}
// tabwriter makes sure the spacing are consistent across different values
// colorable handles the escape sequence for stdout using ascii color codes
var out *tabwriter.Writer
Expand All @@ -701,7 +705,7 @@ func (app *App) startupMessage(addr string, tls bool, pids string) {
fmt.Fprintf(out, logo, cBlack, cBlack,
cCyan, cBlack, fmt.Sprintf(" HOST %s\tOS %s", cyan(host), cyan(osName)),
cCyan, cBlack, fmt.Sprintf(" PORT %s\tTHREADS %s", cyan(port), cyan(cpuThreads)),
cCyan, cBlack, fmt.Sprintf(" TLS %s\tMEM %s", cyan(tlsStr), cyan(memTotal)),
cCyan, cBlack, fmt.Sprintf(" TLS %s\tMEM %s", cyan(tlsStr), cyan(preforkStr)),
cBlack, cyan(Version), fmt.Sprintf(" HANDLERS %s\t\t\t PID %s%s%s\n", cyan(handlerCount), cyan(pid), pids, cReset),
)
// Write to io.write
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ module github.com/gofiber/fiber
go 1.11

require (
github.com/gofiber/utils v0.0.9
github.com/gofiber/utils v0.0.10
github.com/gorilla/schema v1.1.0
github.com/mattn/go-colorable v0.1.7
github.com/mattn/go-isatty v0.0.12
github.com/valyala/bytebufferpool v1.0.0
github.com/valyala/fasthttp v1.15.1
github.com/valyala/fasthttp v1.16.0
)
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
github.com/andybalholm/brotli v1.0.0 h1:7UCwP93aiSfvWpapti8g88vVVGp2qqtGyePsSuDafo4=
github.com/andybalholm/brotli v1.0.0/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y=
github.com/gofiber/utils v0.0.9 h1:Bu4grjEB4zof1TtpmPCG6MeX5nGv8SaQfzaUgjkf3H8=
github.com/gofiber/utils v0.0.9/go.mod h1:9J5aHFUIjq0XfknT4+hdSMG6/jzfaAgCu4HEbWDeBlo=
github.com/gofiber/utils v0.0.10 h1:3Mr7X7JdCUo7CWf/i5sajSaDmArEDtti8bM1JUVso2U=
github.com/gofiber/utils v0.0.10/go.mod h1:9J5aHFUIjq0XfknT4+hdSMG6/jzfaAgCu4HEbWDeBlo=
github.com/gorilla/schema v1.1.0 h1:CamqUDOFUBqzrvxuz2vEwo8+SUdwsluFh7IlzJh30LY=
github.com/gorilla/schema v1.1.0/go.mod h1:kgLaKoK1FELgZqMAVxx/5cbj0kT+57qxUrAlIO2eleU=
github.com/klauspost/compress v1.10.7 h1:7rix8v8GpI3ZBb0nSozFRgbtXKv+hOe+qfEpZqybrAg=
Expand All @@ -12,8 +12,8 @@ github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHX
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
github.com/valyala/fasthttp v1.15.1 h1:eRb5jzWhbCn/cGu3gNJMcOfPUfXgXCcQIOHjh9ajAS8=
github.com/valyala/fasthttp v1.15.1/go.mod h1:YOKImeEosDdBPnxc0gy7INqi3m1zK6A+xl6TwOBhHCA=
github.com/valyala/fasthttp v1.16.0 h1:9zAqOYLl8Tuy3E5R6ckzGDJ1g8+pw15oQp2iL9Jl6gQ=
github.com/valyala/fasthttp v1.16.0/go.mod h1:YOKImeEosDdBPnxc0gy7INqi3m1zK6A+xl6TwOBhHCA=
github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a h1:0R4NLDRDZX6JcmhJgXi5E4b8Wg84ihbmUKp/GvSPEzc=
github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M=
Expand Down
2 changes: 1 addition & 1 deletion middleware/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ func logger(config LoggerConfig) fiber.Handler {
if strings.Contains(config.Format, "${time}") {
go func() {
for {
time.Sleep(time.Millisecond)
time.Sleep(450 * time.Millisecond)
timestamp.Store(nowTimeString(config.timeZoneLocation, config.TimeFormat))
}
}()
Expand Down

2 comments on commit 7a152c2

@Fenny
Copy link
Member Author

@Fenny Fenny commented on 7a152c2 Aug 24, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 7a152c2 Previous: efc06af Ratio
Benchmark_Ctx_Send 266 ns/op 64 B/op 4 allocs/op 6.46 ns/op 0 B/op 0 allocs/op 41.18
Benchmark_Ctx_Write 326 ns/op 240 B/op 4 allocs/op 41.7 ns/op 71 B/op 0 allocs/op 7.82
Benchmark_Route_Match 75.2 ns/op 0 B/op 0 allocs/op 29.5 ns/op 0 B/op 0 allocs/op 2.55
Benchmark_Route_Match_Star 18.2 ns/op 0 B/op 0 allocs/op 4.26 ns/op 0 B/op 0 allocs/op 4.27

This comment was automatically generated by workflow using github-action-benchmark.

@Fenny
Copy link
Member Author

@Fenny Fenny commented on 7a152c2 Aug 24, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 7a152c2 Previous: efc06af Ratio
Benchmark_Ctx_Send 281 ns/op 64 B/op 4 allocs/op 6.46 ns/op 0 B/op 0 allocs/op 43.50
Benchmark_Ctx_Write 343 ns/op 239 B/op 4 allocs/op 41.7 ns/op 71 B/op 0 allocs/op 8.23
Benchmark_Route_Match 77.2 ns/op 0 B/op 0 allocs/op 29.5 ns/op 0 B/op 0 allocs/op 2.62
Benchmark_Route_Match_Star 19.3 ns/op 0 B/op 0 allocs/op 4.26 ns/op 0 B/op 0 allocs/op 4.53

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.