filer: migrating filer store from persisting shorter structured file id instead of a string
This commit is contained in:
18
weed/pb/filer_pb/filer_pb_helper_test.go
Normal file
18
weed/pb/filer_pb/filer_pb_helper_test.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package filer_pb
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/gogo/protobuf/proto"
|
||||
)
|
||||
|
||||
func TestFileIdSize(t *testing.T) {
|
||||
fileIdStr := "11745,0293434534cbb9892b"
|
||||
|
||||
fid, _ := toFileId(fileIdStr)
|
||||
bytes, _ := proto.Marshal(fid)
|
||||
|
||||
println(len(fileIdStr))
|
||||
println(len(bytes))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user