diff --git a/pkg/peeringdb/peeringdb.go b/pkg/peeringdb/peeringdb.go index fc42faf3..3845dede 100644 --- a/pkg/peeringdb/peeringdb.go +++ b/pkg/peeringdb/peeringdb.go @@ -109,7 +109,7 @@ func networkInfo(asn uint32, queryTimeout uint, apiKey string) (*Data, error) { var pDbResponse Response if err := json.Unmarshal(body, &pDbResponse); err != nil { - return nil, fmt.Errorf("PeeringDB JSON Unmarshal: %s", err) + return nil, fmt.Errorf("%s PeeringDB JSON Unmarshal: %s", req.URL, err) } if len(pDbResponse.Data) < 1 { @@ -209,7 +209,7 @@ func NeverViaRouteServers(queryTimeout uint, apiKey string) ([]uint32, error) { var pDbResponse Response if err := json.Unmarshal(body, &pDbResponse); err != nil { - return nil, fmt.Errorf("PeeringDB JSON Unmarshal: %s", err) + return nil, fmt.Errorf("%s PeeringDB JSON Unmarshal: %s", req.URL, err) } var asns []uint32 // ASNs that are reportedly never reachable via route servers @@ -255,7 +255,7 @@ func IXLANs(asn uint32, peeringDbQueryTimeout uint, apiKey string) ([]IxLanData, var pDbResponse IxLanResponse if err := json.Unmarshal(body, &pDbResponse); err != nil { - return nil, fmt.Errorf("PeeringDB JSON Unmarshal: %s", err) + return nil, fmt.Errorf("%s PeeringDB JSON Unmarshal: %s", req.URL, err) } if len(pDbResponse.Data) < 1 { diff --git a/pkg/process/process.go b/pkg/process/process.go index bc08d788..a5beec16 100644 --- a/pkg/process/process.go +++ b/pkg/process/process.go @@ -854,5 +854,13 @@ func Run(configFilename, lockFile, version string, noConfigure, dryRun, withdraw } } - log.Infof("Processed %d peers in %s", len(c.Peers), time.Since(startTime).Round(time.Second)) + log.Infof("Processed %d sessions over %d peers in %s", countSessions(c.Peers), len(c.Peers), time.Since(startTime).Round(time.Second)) +} + +func countSessions(peers map[string]*config.Peer) int { + var count int + for _, p := range peers { + count += len(*p.NeighborIPs) + } + return count }