Documentation ¶
Overview ¶
Package stats provides functions to collect statistics about the import process.
Index ¶
Constants ¶
View Source
const ( RESET = iota START STOP QUIT )
Variables ¶
This section is empty.
Functions ¶
func MemProfiler ¶
func StartHTTPPProf ¶ added in v0.7.0
func StartHTTPPProf(bind string)
Types ¶
type Counter ¶
type Counter struct { Coords *RpsCounter Nodes *RpsCounter Ways *RpsCounter Relations *RpsCounter // contains filtered or unexported fields }
func NewCounter ¶
func NewCounter() *Counter
func NewCounterWithEstimate ¶
func NewCounterWithEstimate(counts ElementCounts) *Counter
func (*Counter) CurrentCount ¶
func (c *Counter) CurrentCount() *ElementCounts
Duration returns the duration since start with seconds precission.
func (*Counter) PrintStats ¶
func (c *Counter) PrintStats()
type ElementCount ¶
type ElementCounts ¶
type ElementCounts struct {
Coords, Nodes, Ways, Relations ElementCount
}
type RpsCounter ¶
type RpsCounter struct {
// contains filtered or unexported fields
}
func NewRpsCounter ¶
func NewRpsCounter() *RpsCounter
func (*RpsCounter) Add ¶
func (r *RpsCounter) Add(n int)
func (*RpsCounter) Count ¶
func (r *RpsCounter) Count() ElementCount
func (*RpsCounter) LastRps ¶
func (r *RpsCounter) LastRps() float64
func (*RpsCounter) Progress ¶
func (r *RpsCounter) Progress() float64
func (*RpsCounter) Rps ¶
func (r *RpsCounter) Rps() float64
func (*RpsCounter) Tick ¶
func (r *RpsCounter) Tick()
func (*RpsCounter) Value ¶
func (r *RpsCounter) Value() int64
type Statistics ¶
type Statistics struct {
// contains filtered or unexported fields
}
func NewStatsReporter ¶
func NewStatsReporter() *Statistics
func NewStatsReporterWithEstimate ¶
func NewStatsReporterWithEstimate(counts *ElementCounts) *Statistics
func (*Statistics) AddCoords ¶
func (s *Statistics) AddCoords(n int)
func (*Statistics) AddNodes ¶
func (s *Statistics) AddNodes(n int)
func (*Statistics) AddRelations ¶
func (s *Statistics) AddRelations(n int)
func (*Statistics) AddWays ¶
func (s *Statistics) AddWays(n int)
func (*Statistics) Stop ¶
func (s *Statistics) Stop() *ElementCounts
Click to show internal directories.
Click to hide internal directories.