metrics

package
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2026 License: MIT Imports: 2 Imported by: 0

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