Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
4b9c3bd3
Unverified
Commit
4b9c3bd3
authored
May 15, 2019
by
Anton Evangelatov
Committed by
GitHub
May 15, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swarm/storage: disable open tracing on indices (#19578)
parent
9b0d1b9a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
29 deletions
+0
-29
subscription_pull.go
swarm/storage/localstore/subscription_pull.go
+0
-15
subscription_push.go
swarm/storage/localstore/subscription_push.go
+0
-14
No files found.
swarm/storage/localstore/subscription_pull.go
View file @
4b9c3bd3
...
@@ -26,9 +26,6 @@ import (
...
@@ -26,9 +26,6 @@ import (
"github.com/ethereum/go-ethereum/metrics"
"github.com/ethereum/go-ethereum/metrics"
"github.com/ethereum/go-ethereum/swarm/chunk"
"github.com/ethereum/go-ethereum/swarm/chunk"
"github.com/ethereum/go-ethereum/swarm/shed"
"github.com/ethereum/go-ethereum/swarm/shed"
"github.com/ethereum/go-ethereum/swarm/spancontext"
"github.com/opentracing/opentracing-go"
olog
"github.com/opentracing/opentracing-go/log"
"github.com/syndtr/goleveldb/leveldb"
"github.com/syndtr/goleveldb/leveldb"
)
)
...
@@ -88,9 +85,6 @@ func (db *DB) SubscribePull(ctx context.Context, bin uint8, since, until uint64)
...
@@ -88,9 +85,6 @@ func (db *DB) SubscribePull(ctx context.Context, bin uint8, since, until uint64)
// - context is done
// - context is done
metrics
.
GetOrRegisterCounter
(
metricName
+
".iter"
,
nil
)
.
Inc
(
1
)
metrics
.
GetOrRegisterCounter
(
metricName
+
".iter"
,
nil
)
.
Inc
(
1
)
ctx
,
sp
:=
spancontext
.
StartSpan
(
ctx
,
metricName
+
".iter"
)
sp
.
LogFields
(
olog
.
Int
(
"bin"
,
int
(
bin
)),
olog
.
Uint64
(
"since"
,
since
),
olog
.
Uint64
(
"until"
,
until
))
iterStart
:=
time
.
Now
()
iterStart
:=
time
.
Now
()
var
count
int
var
count
int
err
:=
db
.
pullIndex
.
Iterate
(
func
(
item
shed
.
Item
)
(
stop
bool
,
err
error
)
{
err
:=
db
.
pullIndex
.
Iterate
(
func
(
item
shed
.
Item
)
(
stop
bool
,
err
error
)
{
...
@@ -131,15 +125,6 @@ func (db *DB) SubscribePull(ctx context.Context, bin uint8, since, until uint64)
...
@@ -131,15 +125,6 @@ func (db *DB) SubscribePull(ctx context.Context, bin uint8, since, until uint64)
totalTimeMetric
(
metricName
+
".iter"
,
iterStart
)
totalTimeMetric
(
metricName
+
".iter"
,
iterStart
)
sp
.
FinishWithOptions
(
opentracing
.
FinishOptions
{
LogRecords
:
[]
opentracing
.
LogRecord
{
{
Timestamp
:
time
.
Now
(),
Fields
:
[]
olog
.
Field
{
olog
.
Int
(
"count"
,
count
)},
},
},
})
if
err
!=
nil
{
if
err
!=
nil
{
if
err
==
errStopSubscription
{
if
err
==
errStopSubscription
{
// stop subscription without any errors
// stop subscription without any errors
...
...
swarm/storage/localstore/subscription_push.go
View file @
4b9c3bd3
...
@@ -25,9 +25,6 @@ import (
...
@@ -25,9 +25,6 @@ import (
"github.com/ethereum/go-ethereum/metrics"
"github.com/ethereum/go-ethereum/metrics"
"github.com/ethereum/go-ethereum/swarm/chunk"
"github.com/ethereum/go-ethereum/swarm/chunk"
"github.com/ethereum/go-ethereum/swarm/shed"
"github.com/ethereum/go-ethereum/swarm/shed"
"github.com/ethereum/go-ethereum/swarm/spancontext"
"github.com/opentracing/opentracing-go"
olog
"github.com/opentracing/opentracing-go/log"
)
)
// SubscribePush returns a channel that provides storage chunks with ordering from push syncing index.
// SubscribePush returns a channel that provides storage chunks with ordering from push syncing index.
...
@@ -68,8 +65,6 @@ func (db *DB) SubscribePush(ctx context.Context) (c <-chan chunk.Chunk, stop fun
...
@@ -68,8 +65,6 @@ func (db *DB) SubscribePush(ctx context.Context) (c <-chan chunk.Chunk, stop fun
// - context is done
// - context is done
metrics
.
GetOrRegisterCounter
(
metricName
+
".iter"
,
nil
)
.
Inc
(
1
)
metrics
.
GetOrRegisterCounter
(
metricName
+
".iter"
,
nil
)
.
Inc
(
1
)
ctx
,
sp
:=
spancontext
.
StartSpan
(
ctx
,
metricName
+
".iter"
)
iterStart
:=
time
.
Now
()
iterStart
:=
time
.
Now
()
var
count
int
var
count
int
err
:=
db
.
pushIndex
.
Iterate
(
func
(
item
shed
.
Item
)
(
stop
bool
,
err
error
)
{
err
:=
db
.
pushIndex
.
Iterate
(
func
(
item
shed
.
Item
)
(
stop
bool
,
err
error
)
{
...
@@ -106,15 +101,6 @@ func (db *DB) SubscribePush(ctx context.Context) (c <-chan chunk.Chunk, stop fun
...
@@ -106,15 +101,6 @@ func (db *DB) SubscribePush(ctx context.Context) (c <-chan chunk.Chunk, stop fun
totalTimeMetric
(
metricName
+
".iter"
,
iterStart
)
totalTimeMetric
(
metricName
+
".iter"
,
iterStart
)
sp
.
FinishWithOptions
(
opentracing
.
FinishOptions
{
LogRecords
:
[]
opentracing
.
LogRecord
{
{
Timestamp
:
time
.
Now
(),
Fields
:
[]
olog
.
Field
{
olog
.
Int
(
"count"
,
count
)},
},
},
})
if
err
!=
nil
{
if
err
!=
nil
{
metrics
.
GetOrRegisterCounter
(
metricName
+
".iter.error"
,
nil
)
.
Inc
(
1
)
metrics
.
GetOrRegisterCounter
(
metricName
+
".iter.error"
,
nil
)
.
Inc
(
1
)
log
.
Error
(
"localstore push subscription iteration"
,
"err"
,
err
)
log
.
Error
(
"localstore push subscription iteration"
,
"err"
,
err
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment