moved all compression to separate package and sanitized identifiers

This commit is contained in:
Jarek Kowalski
2019-12-10 23:06:59 -08:00
parent 8ab93e0e2f
commit 2ba4e83cef
14 changed files with 124 additions and 93 deletions

View File

@@ -7,7 +7,7 @@
"time"
"github.com/kopia/kopia/internal/units"
"github.com/kopia/kopia/repo/object"
"github.com/kopia/kopia/repo/compression"
kingpin "gopkg.in/alecthomas/kingpin.v2"
)
@@ -23,7 +23,7 @@
func runBenchmarkCompressionAction(ctx *kingpin.ParseContext) error {
type benchResult struct {
compression object.CompressorName
compression compression.Name
throughput float64
compressedSize int64
}
@@ -41,7 +41,7 @@ type benchResult struct {
data = d
}
for name, comp := range object.CompressorsByName {
for name, comp := range compression.ByName {
log.Infof("Benchmarking compressor '%v' (%v x %v bytes)", name, *benchmarkCompressionRepeat, len(data))
t0 := time.Now()