Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
edeffa55
Commit
edeffa55
authored
Dec 14, 2016
by
Jeromy Johnson
Committed by
GitHub
Dec 14, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3502 from ipfs/deps/go-ds-measure
Update go-ds-measure to 1.1.0
parents
4cb236ca
4016f403
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
16 deletions
+8
-16
package.json
package.json
+2
-2
repo/fsrepo/defaultds.go
repo/fsrepo/defaultds.go
+4
-2
repo/fsrepo/fsrepo.go
repo/fsrepo/fsrepo.go
+2
-12
No files found.
package.json
View file @
edeffa55
...
...
@@ -219,9 +219,9 @@
},
{
"author"
:
"whyrusleeping"
,
"hash"
:
"Qm
a2gYZ4F7ftPMPve1RvbNJS45R3Y2qoYDtibH8MrwXAv4
"
,
"hash"
:
"Qm
bUSMTQtK9GRrUbD4ngqJwSzHsquUc8nyDubRWp4vPybH
"
,
"name"
:
"go-ds-measure"
,
"version"
:
"1.
0.3
"
"version"
:
"1.
1.0
"
},
{
"author"
:
"whyrusleeping"
,
...
...
repo/fsrepo/defaultds.go
View file @
edeffa55
...
...
@@ -7,11 +7,12 @@ import (
repo
"github.com/ipfs/go-ipfs/repo"
config
"github.com/ipfs/go-ipfs/repo/config"
"github.com/ipfs/go-ipfs/thirdparty/dir"
ds
"gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore"
mount
"gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore/syncmount"
"gx/ipfs/Qma2gYZ4F7ftPMPve1RvbNJS45R3Y2qoYDtibH8MrwXAv4/go-ds-measure"
levelds
"gx/ipfs/QmaHHmfEozrrotyhyN44omJouyuEtx6ahddqV6W5yRaUSQ/go-ds-leveldb"
ldbopts
"gx/ipfs/QmbBhyDKsY4mbY6xsKt3qu9Y7FPvMJ6qbD8AMjYYvPRw1g/goleveldb/leveldb/opt"
measure
"gx/ipfs/QmbUSMTQtK9GRrUbD4ngqJwSzHsquUc8nyDubRWp4vPybH/go-ds-measure"
"gx/ipfs/Qmbx2KUs8mUbDUiiESzC1ms7mdmh4pRu8X1V1tffC46M4n/go-ds-flatfs"
)
...
...
@@ -48,7 +49,8 @@ func openDefaultDatastore(r *FSRepo) (repo.Datastore, error) {
// the tests pass in a zero Config; cope with it
id
=
fmt
.
Sprintf
(
"uninitialized_%p"
,
r
)
}
prefix
:=
"fsrepo."
+
id
+
".datastore."
prefix
:=
"ipfs.fsrepo.datastore."
metricsBlocks
:=
measure
.
New
(
prefix
+
"blocks"
,
blocksDS
)
metricsLevelDB
:=
measure
.
New
(
prefix
+
"leveldb"
,
leveldbDS
)
mountDS
:=
mount
.
New
([]
mount
.
Mount
{
...
...
repo/fsrepo/fsrepo.go
View file @
edeffa55
...
...
@@ -22,8 +22,8 @@ import (
logging "gx/ipfs/QmSpJByNKFX1sCsHBEp3R73FL4NF6FnQTEGyNAXHm2GS52/go-log"
ma "gx/ipfs/QmUAQaWbKxGCUTuoQVvvicbQNZ9APF5pDGWyAZSe93AtKH/go-multiaddr"
"gx/ipfs/Qma2gYZ4F7ftPMPve1RvbNJS45R3Y2qoYDtibH8MrwXAv4/go-ds-measure"
util "gx/ipfs/Qmb912gdngC1UWwTkhuW8knyRbcWeu5kqkxBpveLmW8bSr/go-ipfs-util"
"gx/ipfs/QmbUSMTQtK9GRrUbD4ngqJwSzHsquUc8nyDubRWp4vPybH/go-ds-measure"
)
var log = logging.Logger("fsrepo")
...
...
@@ -365,17 +365,7 @@ func (r *FSRepo) openDatastore() error {
}
// Wrap it with metrics gathering
//
// Add our PeerID to metrics paths to keep them unique
//
// As some tests just pass a zero-value Config to fsrepo.Init,
// cope with missing PeerID.
id
:=
r
.
config
.
Identity
.
PeerID
if
id
==
""
{
// the tests pass in a zero Config; cope with it
id
=
fmt
.
Sprintf
(
"uninitialized_%p"
,
r
)
}
prefix
:=
"fsrepo."
+
id
+
".datastore"
prefix := "ipfs.fsrepo.datastore"
r.ds = measure.New(prefix, r.ds)
return nil
...
...
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