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

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

Issue 1223213002: Remove libs/clock in favor of luci-go/common/clock. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@abstract
Patch Set: rebase Created 5 years, 5 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
« no previous file with comments | « go/src/infra/libs/clock/timer.go ('k') | go/src/infra/monitoring/dispatcher/loop_test.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Dispatcher usage: 5 // Dispatcher usage:
6 // go run infra/monitoring/dispatcher 6 // go run infra/monitoring/dispatcher
7 // Expects gatekeeper.json to be in the current directory. 7 // Expects gatekeeper.json to be in the current directory.
8 8
9 package main 9 package main
10 10
11 import ( 11 import (
12 "encoding/json" 12 "encoding/json"
13 "flag" 13 "flag"
14 "fmt" 14 "fmt"
15 "io/ioutil" 15 "io/ioutil"
16 "os" 16 "os"
17 "strings" 17 "strings"
18 "time" 18 "time"
19 19
20 "github.com/luci/luci-go/common/clock"
20 "github.com/luci/luci-go/common/logging/gologger" 21 "github.com/luci/luci-go/common/logging/gologger"
21 22
22 "infra/libs/clock"
23 "infra/monitoring/analyzer" 23 "infra/monitoring/analyzer"
24 "infra/monitoring/client" 24 "infra/monitoring/client"
25 "infra/monitoring/messages" 25 "infra/monitoring/messages"
26 ) 26 )
27 27
28 var ( 28 var (
29 dataURL = flag.String("data_url", "", "Url where alerts are stored") 29 dataURL = flag.String("data_url", "", "Url where alerts are stored")
30 masterFilter = flag.String("master-filter", "", "Filter out maste rs that contain this string") 30 masterFilter = flag.String("master-filter", "", "Filter out maste rs that contain this string")
31 masterOnly = flag.String("master", "", "Only check this master" ) 31 masterOnly = flag.String("master", "", "Only check this master" )
32 mastersOnly = flag.Bool("masters-only", false, "Just check for m aster alerts, not builders") 32 mastersOnly = flag.Bool("masters-only", false, "Just check for m aster alerts, not builders")
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 return nil 299 return nil
300 } 300 }
301 301
302 loopResults := loop(f, cycle, duration, *maxErrs, clock.GetSystemClock() ) 302 loopResults := loop(f, cycle, duration, *maxErrs, clock.GetSystemClock() )
303 303
304 if !loopResults.success { 304 if !loopResults.success {
305 log.Errorf("Failed to run loop, %v errors", loopResults.errs) 305 log.Errorf("Failed to run loop, %v errors", loopResults.errs)
306 os.Exit(1) 306 os.Exit(1)
307 } 307 }
308 } 308 }
OLDNEW
« no previous file with comments | « go/src/infra/libs/clock/timer.go ('k') | go/src/infra/monitoring/dispatcher/loop_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698