Stats: add GetTotalValidated

This commit is contained in:
kayos@tcp.direct 2021-11-25 00:21:41 -08:00
parent 24c4cefe81
commit 9a3f23d5b7
Signed by: kayos
GPG Key ID: 4B841471B4BEE979

View File

@ -50,6 +50,11 @@ func (stats *Statistics) http() {
stats.ValidHTTP++
}
// GetTotalValidated retrieves our grand total validated proxy count.
func (p *Swamp) GetTotalValidated() int {
return p.Stats.Valid4a + p.Stats.Valid4 + p.Stats.Valid5 + p.Stats.ValidHTTP
}
// GetUptime returns the total lifetime duration of our pool.
func (stats *Statistics) GetUptime() time.Duration {
return time.Since(stats.birthday)