aboutsummaryrefslogtreecommitdiff
path: root/pkg/commands/dbsize.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/commands/dbsize.go')
-rw-r--r--pkg/commands/dbsize.go12
1 files changed, 5 insertions, 7 deletions
diff --git a/pkg/commands/dbsize.go b/pkg/commands/dbsize.go
index dbe39a4..b7086a5 100644
--- a/pkg/commands/dbsize.go
+++ b/pkg/commands/dbsize.go
@@ -5,11 +5,9 @@ import (
)
func Dbsize(args []string, getShard func(k string) *core.Shard) interface{} {
- return dbInstance.ExecuteReadAll(func(shards []*core.Shard) interface{} {
- count := 0
- for _, shard := range shards {
- count += len(shard.Data)
- }
- return count
- })
+ count := 0
+ for _, shard := range dbInstance.Shards {
+ count += len(shard.Data)
+ }
+ return count
}