readstats

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: MIT Imports: 5 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package readstats counts the applications by status and by source, without reading them.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Process

func Process(ctx context.Context, db bun.IDB, filter domain.Filter) *run

Process counts the applications filter picks, all of them when it is empty.

Types

type Stats

type Stats struct {
	Total int `json:"total"`
	// ByStatus has every status, 0 included.
	ByStatus map[domain.Status]int `json:"by_status"`
	// BySource has the sources in use: an agent reuses their names rather than make a near double.
	BySource map[domain.Source]int `json:"by_source"`
	// ResponseRate is the share of applications that got past applied, 0 to 1; left out without applications.
	ResponseRate *float64 `json:"response_rate,omitempty" binding:"optional"`
	// ResponseRateBySource is ResponseRate for each source of BySource.
	ResponseRateBySource map[domain.Source]float64 `json:"response_rate_by_source"`
}

Stats are the counts of the applications.

Jump to

Keyboard shortcuts

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