metrics

package
v0.4.9 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: MIT Imports: 2 Imported by: ? modules, 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 metrics computes aggregate statistics over task collections.

It calculates counts by status, priority, effort, and type, as well as critical-path length, dependency depth, and tag usage.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metrics

type Metrics struct {
	TotalTasks             int                    `json:"total_tasks"`
	TasksByStatus          map[model.Status]int   `json:"tasks_by_status"`
	TasksByPriority        map[model.Priority]int `json:"tasks_by_priority"`
	TasksByEffort          map[model.Effort]int   `json:"tasks_by_effort"`
	TasksByType            map[model.TaskType]int `json:"tasks_by_type"`
	TasksByPhase           map[string]int         `json:"tasks_by_phase"`
	BlockedTasksCount      int                    `json:"blocked_tasks_count"`
	CriticalPathLength     int                    `json:"critical_path_length"`
	MaxDependencyDepth     int                    `json:"max_dependency_depth"`
	AvgDependenciesPerTask float64                `json:"avg_dependencies_per_task"`
	TagsByCount            []TagInfo              `json:"tags_by_count"`
}

Metrics contains computed statistics about a task set

func Calculate

func Calculate(tasks []*model.Task) *Metrics

Calculate computes metrics for a set of tasks

type TagInfo

type TagInfo struct {
	Tag   string `json:"tag"`
	Count int    `json:"count"`
}

TagInfo holds a tag and how many tasks use it

Jump to

Keyboard shortcuts

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