Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

all: make badger/v2 compatible with v1 #1293

Merged
merged 1 commit into from
Apr 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 60 additions & 56 deletions pb/pb.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pb/pb.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// Use protos/gen.sh to generate .pb.go files.
syntax = "proto3";

package pb;
package dgraph.badger.v2.pb;

option go_package = "github.com/dgraph-io/badger/v2/pb";

Expand Down
26 changes: 13 additions & 13 deletions y/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,17 @@ var (

// These variables are global and have cumulative values for all kv stores.
func init() {
NumReads = expvar.NewInt("badger_disk_reads_total")
NumWrites = expvar.NewInt("badger_disk_writes_total")
NumBytesRead = expvar.NewInt("badger_read_bytes")
NumBytesWritten = expvar.NewInt("badger_written_bytes")
NumLSMGets = expvar.NewMap("badger_lsm_level_gets_total")
NumLSMBloomHits = expvar.NewMap("badger_lsm_bloom_hits_total")
NumGets = expvar.NewInt("badger_gets_total")
NumPuts = expvar.NewInt("badger_puts_total")
NumBlockedPuts = expvar.NewInt("badger_blocked_puts_total")
NumMemtableGets = expvar.NewInt("badger_memtable_gets_total")
LSMSize = expvar.NewMap("badger_lsm_size_bytes")
VlogSize = expvar.NewMap("badger_vlog_size_bytes")
PendingWrites = expvar.NewMap("badger_pending_writes_total")
NumReads = expvar.NewInt("badger_v2_disk_reads_total")
NumWrites = expvar.NewInt("badger_v2_disk_writes_total")
NumBytesRead = expvar.NewInt("badger_v2_read_bytes")
NumBytesWritten = expvar.NewInt("badger_v2_written_bytes")
NumLSMGets = expvar.NewMap("badger_v2_lsm_level_gets_total")
NumLSMBloomHits = expvar.NewMap("badger_v2_lsm_bloom_hits_total")
NumGets = expvar.NewInt("badger_v2_gets_total")
NumPuts = expvar.NewInt("badger_v2_puts_total")
NumBlockedPuts = expvar.NewInt("badger_v2_blocked_puts_total")
NumMemtableGets = expvar.NewInt("badger_v2_memtable_gets_total")
LSMSize = expvar.NewMap("badger_v2_lsm_size_bytes")
VlogSize = expvar.NewMap("badger_v2_vlog_size_bytes")
PendingWrites = expvar.NewMap("badger_v2_pending_writes_total")
}