OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The LUCI 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 under the Apache License, Version 2.0 |
3 // found in the LICENSE file. | 3 // that can be found in the LICENSE file. |
4 | 4 |
5 // Package count contains 'counter' filters for all the gae services. This | 5 // Package count contains 'counter' filters for all the gae services. This |
6 // serves as a set of simple example filters, and also enables other filters | 6 // serves as a set of simple example filters, and also enables other filters |
7 // to test to see if certain underlying APIs are called when they should be | 7 // to test to see if certain underlying APIs are called when they should be |
8 // (e.g. for the datastore mcache filter, for example). | 8 // (e.g. for the datastore mcache filter, for example). |
9 package count | 9 package count |
10 | 10 |
11 import ( | 11 import ( |
12 "fmt" | 12 "fmt" |
13 "sync/atomic" | 13 "sync/atomic" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 if len(errs) > 0 { | 55 if len(errs) > 0 { |
56 err = errs[0] | 56 err = errs[0] |
57 } | 57 } |
58 if err == nil { | 58 if err == nil { |
59 e.successes.increment() | 59 e.successes.increment() |
60 } else { | 60 } else { |
61 e.errors.increment() | 61 e.errors.increment() |
62 } | 62 } |
63 return err | 63 return err |
64 } | 64 } |
OLD | NEW |