mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
go fmt
This commit is contained in:
parent
8da5d5b094
commit
6c01fb6d2d
|
@ -149,7 +149,9 @@ func (fs *FilerServer) updateFilerStore(ctx context.Context, r *http.Request, w
|
||||||
|
|
||||||
stats.FilerRequestCounter.WithLabelValues("postStoreWrite").Inc()
|
stats.FilerRequestCounter.WithLabelValues("postStoreWrite").Inc()
|
||||||
start := time.Now()
|
start := time.Now()
|
||||||
defer func() { stats.FilerRequestHistogram.WithLabelValues("postStoreWrite").Observe(time.Since(start).Seconds()) }()
|
defer func() {
|
||||||
|
stats.FilerRequestHistogram.WithLabelValues("postStoreWrite").Observe(time.Since(start).Seconds())
|
||||||
|
}()
|
||||||
|
|
||||||
path := r.URL.Path
|
path := r.URL.Path
|
||||||
existingEntry, err := fs.filer.FindEntry(ctx, filer2.FullPath(path))
|
existingEntry, err := fs.filer.FindEntry(ctx, filer2.FullPath(path))
|
||||||
|
|
|
@ -71,7 +71,9 @@ func (fs *FilerServer) doAutoChunk(ctx context.Context, w http.ResponseWriter, r
|
||||||
|
|
||||||
stats.FilerRequestCounter.WithLabelValues("postAutoChunk").Inc()
|
stats.FilerRequestCounter.WithLabelValues("postAutoChunk").Inc()
|
||||||
start := time.Now()
|
start := time.Now()
|
||||||
defer func() { stats.FilerRequestHistogram.WithLabelValues("postAutoChunk").Observe(time.Since(start).Seconds()) }()
|
defer func() {
|
||||||
|
stats.FilerRequestHistogram.WithLabelValues("postAutoChunk").Observe(time.Since(start).Seconds())
|
||||||
|
}()
|
||||||
|
|
||||||
multipartReader, multipartReaderErr := r.MultipartReader()
|
multipartReader, multipartReaderErr := r.MultipartReader()
|
||||||
if multipartReaderErr != nil {
|
if multipartReaderErr != nil {
|
||||||
|
@ -190,7 +192,9 @@ func (fs *FilerServer) doUpload(urlLocation string, w http.ResponseWriter, r *ht
|
||||||
|
|
||||||
stats.FilerRequestCounter.WithLabelValues("postAutoChunkUpload").Inc()
|
stats.FilerRequestCounter.WithLabelValues("postAutoChunkUpload").Inc()
|
||||||
start := time.Now()
|
start := time.Now()
|
||||||
defer func() { stats.FilerRequestHistogram.WithLabelValues("postAutoChunkUpload").Observe(time.Since(start).Seconds()) }()
|
defer func() {
|
||||||
|
stats.FilerRequestHistogram.WithLabelValues("postAutoChunkUpload").Observe(time.Since(start).Seconds())
|
||||||
|
}()
|
||||||
|
|
||||||
ioReader := ioutil.NopCloser(bytes.NewBuffer(chunkBuf))
|
ioReader := ioutil.NopCloser(bytes.NewBuffer(chunkBuf))
|
||||||
uploadResult, uploadError := operation.Upload(urlLocation, fileName, ioReader, false, contentType, nil, auth)
|
uploadResult, uploadError := operation.Upload(urlLocation, fileName, ioReader, false, contentType, nil, auth)
|
||||||
|
|
Loading…
Reference in a new issue