diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 62f61e1d..00000000 --- a/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -*.rdb filter=lfs diff=lfs merge=lfs -text -internal/rdb/dump.rdb filter=lfs diff=lfs merge=lfs -text diff --git a/internal/rdb/dump.rdb b/internal/rdb/dump.rdb deleted file mode 100644 index 34910568..00000000 --- a/internal/rdb/dump.rdb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:852c652352e4ac590e4002b42849c82a4bae3c962cce5c0f774dc132c3436058 -size 54480930 diff --git a/internal/rdb/rdb_test.go b/internal/rdb/rdb_test.go deleted file mode 100644 index 955fbce8..00000000 --- a/internal/rdb/rdb_test.go +++ /dev/null @@ -1,30 +0,0 @@ -package rdb - -import ( - "context" - "testing" - - "RedisShake/internal/entry" -) - -// BenchmarkParseRDB is a benchmark for ParseRDB -// The baseline is "20 350030327 ns/op 213804114 B/op 1900715 allocs/op" -func BenchmarkParseRDB(b *testing.B) { - b.ReportAllocs() - b.ResetTimer() - tempChan := make(chan *entry.Entry, 1024) - updateFunc := func(offset int64) { - - } - b.N = 20 - - for i := 0; i < b.N; i++ { - loader := NewLoader("rdb", updateFunc, "./dump.rdb", tempChan) - go func() { - for temp := range tempChan { - print(temp.CmdName) - } - }() - loader.ParseRDB(context.Background()) - } -}