aboutsummaryrefslogtreecommitdiff
path: root/unmaintained
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2021-06-27 05:51:28 -0700
committerChris Lu <chris.lu@gmail.com>2021-06-27 05:54:16 -0700
commitcc7714fdbe4cce0eb8fd37915fa986064ffabdc1 (patch)
treebb0f94df840baa38185f8b79ebd26a8a2dd05059 /unmaintained
parentfacaa36d2209062d362ae410d591840aec97bae8 (diff)
downloadseaweedfs-cc7714fdbe4cce0eb8fd37915fa986064ffabdc1.tar.xz
seaweedfs-cc7714fdbe4cce0eb8fd37915fa986064ffabdc1.zip
logging changes to debug
Diffstat (limited to 'unmaintained')
-rw-r--r--unmaintained/load_test/load_test_meta_tail/load_test_meta_tail.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/unmaintained/load_test/load_test_meta_tail/load_test_meta_tail.go b/unmaintained/load_test/load_test_meta_tail/load_test_meta_tail.go
index 98db80a05..53cb2f912 100644
--- a/unmaintained/load_test/load_test_meta_tail/load_test_meta_tail.go
+++ b/unmaintained/load_test/load_test_meta_tail/load_test_meta_tail.go
@@ -4,18 +4,20 @@ import (
"context"
"flag"
"fmt"
+ "github.com/chrislusf/seaweedfs/weed/glog"
"github.com/chrislusf/seaweedfs/weed/pb"
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
"google.golang.org/grpc"
"io"
"strconv"
+ "time"
)
var (
dir = flag.String("dir", "/tmp", "directory to create files")
n = flag.Int("n", 100, "the number of metadata")
tailFiler = flag.String("filer", "localhost:8888", "the filer address")
- isWrite = flag.Bool("write", false, "only write")
+ isWrite = flag.Bool("write", false, "only write")
)
func main() {
@@ -33,7 +35,7 @@ func main() {
return nil
}
name := event.EventNotification.NewEntry.Name
- fmt.Printf("=> %s\n", name)
+ glog.V(0).Infof("=> %s ts:%+v", name, time.Unix(0, event.TsNs))
id := name[4:]
if x, err := strconv.Atoi(id); err == nil {
if x != expected {
@@ -43,6 +45,7 @@ func main() {
} else {
return err
}
+ time.Sleep(10 * time.Millisecond)
return nil
})
@@ -96,6 +99,7 @@ func startSubscribeMetadata(eachEntryFunc func(event *filer_pb.SubscribeMetadata
return listenErr
}
if err = eachEntryFunc(resp); err != nil {
+ glog.V(0).Infof("tail last record:%+v", time.Unix(0, lastTsNs))
return err
}
lastTsNs = resp.TsNs