stats

package
v0.0.0-...-6d375a0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package stats provides a simple way to track and manipulate statistics related to web crawling.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stats

type Stats struct {
	TotalLinks      int
	MatchedLinks    int
	NotMatchedLinks int
	TotalPages      int
	Links           []string
	// contains filtered or unexported fields
}

Stats holds counters for various metrics related to web crawling.

func (s *Stats) GetMatchedLinks() int

GetMatchedLinks retrieves the total number of not matched links.

func (s *Stats) GetNotMatchedLinks() int

GetNotMatchedLinks retrieves the total number of not matched links.

func (*Stats) GetTotalPages

func (s *Stats) GetTotalPages() int

GetTotalPages retrieves the total number of pages crawled.

func (s *Stats) IncrementMatchedLinks()

IncrementMatchedLinks increases the MatchedLinks counter by one.

func (s *Stats) IncrementNotMatchedLinks()

IncrementNotMatchedLinks increases the NotMatchedLinks counter by one.

func (s *Stats) IncrementTotalLinks()

IncrementTotalLinks increases the TotalLinks counter by one.

func (*Stats) IncrementTotalPages

func (s *Stats) IncrementTotalPages()

IncrementTotalPages increases the TotalPages counter by one.

func (*Stats) Report

func (s *Stats) Report() map[string]interface{}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL