| 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 // This file contains types which are mirrors/duplicates of the upstream SDK | 5 // This file contains types which are mirrors/duplicates of the upstream SDK |
| 6 // types. This exists so that users can depend solely on this wrapper library | 6 // types. This exists so that users can depend solely on this wrapper library |
| 7 // without necessarially needing an SDK implementation present. | 7 // without necessarially needing an SDK implementation present. |
| 8 // | 8 // |
| 9 // This was done (instead of type-aliasing from the github version of the SDK) | 9 // This was done (instead of type-aliasing from the github version of the SDK) |
| 10 // because some of the types need to be tweaked (like Task.RetryOptions) to | 10 // because some of the types need to be tweaked (like Task.RetryOptions) to |
| 11 // interact well with the wrapper, and the inconsistency of having some types | 11 // interact well with the wrapper, and the inconsistency of having some types |
| 12 // defined by the gae package and others defined by the SDK was pretty awkward. | 12 // defined by the gae package and others defined by the SDK was pretty awkward. |
| 13 | 13 |
| 14 package taskqueue | 14 package taskqueue |
| 15 | 15 |
| 16 import ( | 16 import ( |
| 17 "time" | 17 "time" |
| 18 ) | 18 ) |
| 19 | 19 |
| 20 // Statistics represents statistics about a single task queue. | 20 // Statistics represents statistics about a single task queue. |
| 21 type Statistics struct { | 21 type Statistics struct { |
| 22 Tasks int // may be an approximation | 22 Tasks int // may be an approximation |
| 23 OldestETA time.Time // zero if there are no pending tasks | 23 OldestETA time.Time // zero if there are no pending tasks |
| 24 | 24 |
| 25 Executed1Minute int // tasks executed in the last minute | 25 Executed1Minute int // tasks executed in the last minute |
| 26 InFlight int // tasks executing now | 26 InFlight int // tasks executing now |
| 27 EnforcedRate float64 // requests per second | 27 EnforcedRate float64 // requests per second |
| 28 } | 28 } |
| OLD | NEW |