satellite/repair/repairer/ec.go: Add monkit tracing for ec repairer
Adds monkit tracing for ecrepairer.downloadAndVerifyPiece and ecrepairer.putPiece so we can get more accurate estimates of node performance during repair. Change-Id: Ic05025bf3c493bb3d6f5d325d090c5b7c9e5465d
This commit is contained in:
parent
d6c90b7ab5
commit
e7e69f383a
@ -170,6 +170,8 @@ func (ec *ECRepairer) Get(ctx context.Context, limits []*pb.AddressedOrderLimit,
|
||||
// expects the original order limit to have the correct piece public key,
|
||||
// and expects the hash of the data to match the signed hash provided by the storagenode.
|
||||
func (ec *ECRepairer) downloadAndVerifyPiece(ctx context.Context, limit *pb.AddressedOrderLimit, privateKey storj.PiecePrivateKey, pieceSize int64) (pieceReadCloser io.ReadCloser, err error) {
|
||||
defer mon.Task()(&ctx)(&err)
|
||||
|
||||
// contact node
|
||||
downloadCtx, cancel := context.WithTimeout(ctx, ec.downloadTimeout)
|
||||
defer cancel()
|
||||
@ -404,6 +406,8 @@ func (ec *ECRepairer) Repair(ctx context.Context, limits []*pb.AddressedOrderLim
|
||||
}
|
||||
|
||||
func (ec *ECRepairer) putPiece(ctx, parent context.Context, limit *pb.AddressedOrderLimit, privateKey storj.PiecePrivateKey, data io.ReadCloser, path storj.Path) (hash *pb.PieceHash, err error) {
|
||||
defer mon.Task()(&ctx)(&err)
|
||||
|
||||
nodeName := "nil"
|
||||
if limit != nil {
|
||||
nodeName = limit.GetLimit().StorageNodeId.String()[0:8]
|
||||
|
Loading…
Reference in New Issue
Block a user