stats

package
v5.12.2 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2021 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckSearchTotalDownloads

func CheckSearchTotalDownloads(c *gc.C, store *charmstore.Store, id *charm.URL, expected int64)

CheckSearchTotalDownloads checks that the search index is properly updated. It retries a few times as they are generally updated in background.

func CheckTotalDownloads added in v5.10.0

func CheckTotalDownloads(c *gc.C, store *charmstore.Store, id *charm.URL, expected int64)

CheckTotalDownloads checks that the download counts are updated .

func ThisMonth added in v5.10.0

func ThisMonth(args ...map[int]int) int64

ThisMonth processes the given day-count mappings, and calculates how many of the counts occurred in the current month. This is necessary as stats are grouped by the current month, and therefore the value changes depending on how far through the month you are.

Each input map is keyed by how many days in the past the count occurred, the value being the count that occured on that day. It is fine for more than one map to contain the same key.

func ThisWeek added in v5.10.0

func ThisWeek(args ...map[int]int) int64

ThisWeek processes the given day-count mappings, and calculates how many of the counts occurred in the current week. This is necessary as weekly stats are grouped by ISO8601 week, and therefore the value changes depending on how far through the week you are.

Each input map is keyed by how many days in the past the count occurred, the value being the count that occured on that day. It is fine for more than one map to contain the same key.

Types

This section is empty.

Jump to

Keyboard shortcuts

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