matrix-org/dendrite

Move to zerolog

Aperta

#1468 aperta il 2 ott 2020

 (12 commenti) (4 reazioni) (0 assegnatari)Go (658 fork)auto 404
T-TaskX-Performancegood first issue

Metriche repository

Star
 (5632 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

We should move to use https://github.com/uber-go/zap or https://github.com/rs/zerolog instead of logrus because logrus does a loooooot of allocations, far more than the rest of Dendrite. I'd propose we use the sugared one since we're not looking for any specific improvement other than "why is logging consuming so much time/allocs". In terms of numbers:

  • logrus 29501 ns/op
  • zap 1250 ns/op (~24x speedup)

Allocations:

  • logrus 125 allocs/op
  • zap 11 allocs/op

Guida contributor