whispervis/stats.go

13 lines
285 B
Go
Raw Normal View History

2018-10-19 16:01:49 +02:00
package main
2018-10-19 18:37:58 +02:00
import (
"github.com/status-im/simulation/propagation"
"github.com/status-im/simulation/stats"
)
2018-10-19 16:01:49 +02:00
2018-10-19 18:37:58 +02:00
func (p *Page) RecalculateStats(plog *propagation.Log) *stats.Stats {
2018-10-23 06:42:56 +02:00
net := p.network.Current()
2018-10-19 16:01:49 +02:00
2018-10-24 15:14:26 +02:00
return stats.Analyze(plog, net.Data.NumNodes(), net.Data.NumLinks())
2018-10-19 16:01:49 +02:00
}