Skip to content

Commit

Permalink
add trace region
Browse files Browse the repository at this point in the history
  • Loading branch information
LuttyYang committed Jun 15, 2022
1 parent 71ee0be commit 6c28424
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/tikv/remote/remote_database.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"github.com/harmony-one/harmony/internal/tikv/common"
"github.com/tikv/client-go/v2/config"
"github.com/tikv/client-go/v2/rawkv"
"runtime/trace"
"sync/atomic"
)

Expand Down Expand Up @@ -53,6 +54,9 @@ func (d *RemoteDatabase) Get(key []byte) ([]byte, error) {
return nil, common.ErrEmptyKey
}

region := trace.StartRegion(context.Background(), "tikv Get")
defer region.End()

get, err := d.client.Get(context.Background(), key)
if err != nil {
return nil, err
Expand Down

0 comments on commit 6c28424

Please sign in to comment.