matrix-org/dendrite

Move to zerolog

Aberta

#1.468 aberto em 2 de out. de 2020

 (12 comentários) (4 reações) (0 responsável)Go (658 forks)auto 404
T-TaskX-Performancegood first issue

Métricas do repositório

Stars
 (5.632 estrelas)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

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

Guia do colaborador