OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |