stats

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use:   "stats",
	Short: "View workout analytics and statistics",
	Long: `Analyze your workout data with summary statistics, progress tracking, and personal records.

Examples:
  hevycli stats summary                    # Monthly workout summary
  hevycli stats summary --period week      # Weekly summary
  hevycli stats progress "Bench Press"     # Track bench press progress
  hevycli stats records                    # View personal records`,
}

Cmd is the stats command

Functions

This section is empty.

Types

type ExerciseFrequency

type ExerciseFrequency struct {
	Name  string `json:"name"`
	Count int    `json:"count"`
}

ExerciseFrequency tracks exercise usage

type PersonalRecord

type PersonalRecord struct {
	Exercise   string  `json:"exercise"`
	RecordType string  `json:"record_type"`
	Value      float64 `json:"value"`
	Unit       string  `json:"unit"`
	Reps       int     `json:"reps,omitempty"`
	Date       string  `json:"date"`
	WorkoutID  string  `json:"workout_id"`
}

PersonalRecord represents a personal record

type ProgressAnalysis

type ProgressAnalysis struct {
	StartingValue  float64 `json:"starting_value"`
	CurrentValue   float64 `json:"current_value"`
	AbsoluteChange float64 `json:"absolute_change"`
	PercentChange  float64 `json:"percent_change"`
	Trend          string  `json:"trend"`
}

ProgressAnalysis contains trend analysis

type ProgressData

type ProgressData struct {
	Exercise   string           `json:"exercise"`
	Metric     string           `json:"metric"`
	Unit       string           `json:"unit"`
	DataPoints []ProgressPoint  `json:"data_points"`
	Analysis   ProgressAnalysis `json:"analysis"`
}

ProgressData holds exercise progress data

type ProgressPoint

type ProgressPoint struct {
	Date  string  `json:"date"`
	Value float64 `json:"value"`
}

ProgressPoint is a single data point

type RecordsData

type RecordsData struct {
	PersonalRecords []PersonalRecord `json:"personal_records"`
}

RecordsData holds all personal records

type SummaryStats

type SummaryStats struct {
	Period struct {
		Start string `json:"start"`
		End   string `json:"end"`
	} `json:"period"`
	Workouts struct {
		Total                  int     `json:"total"`
		AverageDurationMinutes float64 `json:"average_duration_minutes"`
		TotalDurationHours     float64 `json:"total_duration_hours"`
	} `json:"workouts"`
	Volume struct {
		TotalKg           float64 `json:"total_kg"`
		AveragePerWorkout float64 `json:"average_per_workout_kg"`
	} `json:"volume"`
	Exercises struct {
		UniqueCount  int                 `json:"unique_count"`
		TotalSets    int                 `json:"total_sets"`
		MostFrequent []ExerciseFrequency `json:"most_frequent"`
	} `json:"exercises"`
	Consistency struct {
		WorkoutsPerWeek   float64 `json:"workouts_per_week"`
		LongestStreakDays int     `json:"longest_streak_days"`
		CurrentStreakDays int     `json:"current_streak_days"`
	} `json:"consistency"`
}

SummaryStats holds computed statistics

Jump to

Keyboard shortcuts

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