mirror of
https://github.com/akvorado/akvorado.git
synced 2025-12-12 06:24:10 +01:00
common/helpers: convert SubnetMap to github.com/gaissmai/bart
I did not benchmark it myself, but it was benchmarked here: https://github.com/osrg/gobgp/issues/1414#issuecomment-3067255941 Of course, no guarantee that this benchmark matches our use cases. Moreover, SubnetMap have been optimized to avoid parsing keys all the time. Also, the interface is a bit nicer and it uses netip.Prefix directly. The next step is to convert outlet/routing/provider/bmp.
This commit is contained in:
@@ -30,6 +30,7 @@ func defaultPrettyFormatters() map[reflect.Type]any {
|
||||
result := map[reflect.Type]any{
|
||||
reflect.TypeOf(net.IP{}): fmt.Sprint,
|
||||
reflect.TypeOf(netip.Addr{}): fmt.Sprint,
|
||||
reflect.TypeOf(netip.Prefix{}): fmt.Sprint,
|
||||
reflect.TypeOf(time.Time{}): fmt.Sprint,
|
||||
reflect.TypeOf(SubnetMap[string]{}): fmt.Sprint,
|
||||
reflect.TypeOf(SubnetMap[uint]{}): fmt.Sprint,
|
||||
|
||||
Reference in New Issue
Block a user