refactor!: rename module to github.com/theirongolddev/cburn
Change module path from 'cburn' to 'github.com/theirongolddev/cburn' to enable standard Go remote installation: go install github.com/theirongolddev/cburn@latest This is a BREAKING CHANGE for any external code importing this module (though as a CLI tool, this is unlikely to affect anyone). All internal imports updated to use the new module path. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -6,8 +6,8 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"cburn/internal/config"
|
||||
"cburn/internal/model"
|
||||
"github.com/theirongolddev/cburn/internal/config"
|
||||
"github.com/theirongolddev/cburn/internal/model"
|
||||
)
|
||||
|
||||
// Aggregate computes summary statistics from a slice of session stats,
|
||||
@@ -51,7 +51,7 @@ func Aggregate(sessions []model.SessionStats, since, until time.Time) model.Summ
|
||||
// Cache savings (sum across all models found in sessions)
|
||||
for _, s := range filtered {
|
||||
for modelName, mu := range s.Models {
|
||||
stats.CacheSavings += config.CalculateCacheSavings(modelName, mu.CacheReadTokens)
|
||||
stats.CacheSavings += config.CalculateCacheSavingsAt(modelName, s.StartTime, mu.CacheReadTokens)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ import (
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"cburn/internal/source"
|
||||
"cburn/internal/store"
|
||||
"github.com/theirongolddev/cburn/internal/source"
|
||||
"github.com/theirongolddev/cburn/internal/store"
|
||||
)
|
||||
|
||||
func BenchmarkLoad(b *testing.B) {
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
|
||||
"cburn/internal/source"
|
||||
"cburn/internal/store"
|
||||
"github.com/theirongolddev/cburn/internal/source"
|
||||
"github.com/theirongolddev/cburn/internal/store"
|
||||
)
|
||||
|
||||
// CachedLoadResult extends LoadResult with cache metadata.
|
||||
@@ -173,5 +173,6 @@ func CacheDir() string {
|
||||
|
||||
// CachePath returns the full path to the cache database.
|
||||
func CachePath() string {
|
||||
return filepath.Join(CacheDir(), "metrics.db")
|
||||
// v2 includes historical pricing-aware cost calculations.
|
||||
return filepath.Join(CacheDir(), "metrics_v2.db")
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@ import (
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
|
||||
"cburn/internal/model"
|
||||
"cburn/internal/source"
|
||||
"github.com/theirongolddev/cburn/internal/model"
|
||||
"github.com/theirongolddev/cburn/internal/source"
|
||||
)
|
||||
|
||||
// LoadResult holds the output of the full data loading pipeline.
|
||||
|
||||
Reference in New Issue
Block a user