Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Side by Side Diff: go/src/infra/monitoring/client/client.go

Issue 1153883002: go: infra/libs/* now live in luci-go. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: move the rest too Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package client 5 package client
6 6
7 import ( 7 import (
8 "bytes" 8 "bytes"
9 "encoding/json" 9 "encoding/json"
10 "fmt" 10 "fmt"
11 "io/ioutil" 11 "io/ioutil"
12 "net/http" 12 "net/http"
13 "net/url" 13 "net/url"
14 "strings" 14 "strings"
15 "sync/atomic" 15 "sync/atomic"
16 16
17 » "infra/libs/logging/gologger" 17 » "github.com/luci/luci-go/common/logging/gologger"
18 18
19 "infra/monitoring/messages" 19 "infra/monitoring/messages"
20 ) 20 )
21 21
22 var ( 22 var (
23 log = gologger.Get() 23 log = gologger.Get()
24 ) 24 )
25 25
26 // MasterURL returns the builder URL for the given master. 26 // MasterURL returns the builder URL for the given master.
27 func MasterURL(master string) string { 27 func MasterURL(master string) string {
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 log.Infof("Fetched(%d) text: %s", resp.StatusCode, url) 302 log.Infof("Fetched(%d) text: %s", resp.StatusCode, url)
303 return length, err 303 return length, err
304 }) 304 })
305 return ret, status, nil 305 return ret, status, nil
306 } 306 }
307 307
308 func (c *client) DumpStats() { 308 func (c *client) DumpStats() {
309 log.Infof("%d reqs total, %d errors, %d current", c.totalReqs, c.totalEr rs, c.currReqs) 309 log.Infof("%d reqs total, %d errors, %d current", c.totalReqs, c.totalEr rs, c.currReqs)
310 log.Infof("%d bytes read", c.totalBytes) 310 log.Infof("%d bytes read", c.totalBytes)
311 } 311 }
OLDNEW
« no previous file with comments | « go/src/infra/monitoring/analyzer/analyzer.go ('k') | go/src/infra/monitoring/dispatcher/dispatcher.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698