diff options
author | Anton Evangelatov <anton.evangelatov@gmail.com> | 2018-02-23 21:19:59 +0800 |
---|---|---|
committer | Balint Gabor <balint.g@gmail.com> | 2018-02-23 21:19:59 +0800 |
commit | dcca613a0b4c6ce56e52f4607cf71f4f1338db8f (patch) | |
tree | 298e858e042df9d515aa091a79902ee9bf6d9f7b /swarm/fuse | |
parent | b677a07d36c957c4221bae952189559ac0c70537 (diff) | |
download | dexon-dcca613a0b4c6ce56e52f4607cf71f4f1338db8f.tar dexon-dcca613a0b4c6ce56e52f4607cf71f4f1338db8f.tar.gz dexon-dcca613a0b4c6ce56e52f4607cf71f4f1338db8f.tar.bz2 dexon-dcca613a0b4c6ce56e52f4607cf71f4f1338db8f.tar.lz dexon-dcca613a0b4c6ce56e52f4607cf71f4f1338db8f.tar.xz dexon-dcca613a0b4c6ce56e52f4607cf71f4f1338db8f.tar.zst dexon-dcca613a0b4c6ce56e52f4607cf71f4f1338db8f.zip |
swarm: initial instrumentation (#15969)
* swarm: initial instrumentation with go-metrics
* swarm: initialise metrics collection and add ResettingTimer to HTTP requests
* swarm: update metrics flags names. remove redundant Timer.
* swarm: rename method for periodically updating gauges
* swarm: finalise metrics after feedback
* swarm/network: always init kad metrics containers
* swarm/network: off-by-one index in metrics containers
* swarm, metrics: resolved conflicts
Diffstat (limited to 'swarm/fuse')
-rw-r--r-- | swarm/fuse/swarmfs_util.go | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/swarm/fuse/swarmfs_util.go b/swarm/fuse/swarmfs_util.go index d39966c0e..169b67487 100644 --- a/swarm/fuse/swarmfs_util.go +++ b/swarm/fuse/swarmfs_util.go @@ -47,7 +47,6 @@ func externalUnmount(mountPoint string) error { } func addFileToSwarm(sf *SwarmFile, content []byte, size int) error { - fkey, mhash, err := sf.mountInfo.swarmApi.AddFile(sf.mountInfo.LatestManifest, sf.path, sf.name, content, true) if err != nil { return err @@ -64,11 +63,9 @@ func addFileToSwarm(sf *SwarmFile, content []byte, size int) error { log.Info("Added new file:", "fname", sf.name, "New Manifest hash", mhash) return nil - } func removeFileFromSwarm(sf *SwarmFile) error { - mkey, err := sf.mountInfo.swarmApi.RemoveFile(sf.mountInfo.LatestManifest, sf.path, sf.name, true) if err != nil { return err @@ -83,7 +80,6 @@ func removeFileFromSwarm(sf *SwarmFile) error { } func removeDirectoryFromSwarm(sd *SwarmDir) error { - if len(sd.directories) == 0 && len(sd.files) == 0 { return nil } @@ -103,11 +99,9 @@ func removeDirectoryFromSwarm(sd *SwarmDir) error { } return nil - } func appendToExistingFileInSwarm(sf *SwarmFile, content []byte, offset int64, length int64) error { - fkey, mhash, err := sf.mountInfo.swarmApi.AppendFile(sf.mountInfo.LatestManifest, sf.path, sf.name, sf.fileSize, content, sf.key, offset, length, true) if err != nil { return err @@ -124,5 +118,4 @@ func appendToExistingFileInSwarm(sf *SwarmFile, content []byte, offset int64, le log.Info("Appended file:", "fname", sf.name, "New Manifest hash", mhash) return nil - } |