| Index: client/cmd/isolate/checker.go
|
| diff --git a/client/cmd/isolate/checker.go b/client/cmd/isolate/checker.go
|
| index 79cb9733e7bbc79a93a88f8c5aa13650e7ca936a..5e2c159ac6bbd424e7ea6933db99ea2a9b602ea7 100644
|
| --- a/client/cmd/isolate/checker.go
|
| +++ b/client/cmd/isolate/checker.go
|
| @@ -41,6 +41,19 @@ type Checker struct {
|
| svc isolateService
|
| bundler *bundler.Bundler
|
| err error
|
| +
|
| + Hit, Miss CountBytes
|
| +}
|
| +
|
| +// CountBytes aggregates a count of files and the number of bytes in them.
|
| +type CountBytes struct {
|
| + Count int
|
| + Bytes int64
|
| +}
|
| +
|
| +func (cb *CountBytes) addFile(size int64) {
|
| + cb.Count++
|
| + cb.Bytes += size
|
| }
|
|
|
| // NewChecker creates a NewChecker with the given isolated client.
|
| @@ -108,6 +121,12 @@ func (c *Checker) check(items []checkerItem) error {
|
| return err
|
| }
|
| for i, item := range items {
|
| + if size := item.item.Size; out[i] == nil {
|
| + c.Hit.addFile(size)
|
| + } else {
|
| + c.Miss.addFile(size)
|
| + }
|
| +
|
| item.callback(item.item, out[i])
|
| }
|
| return nil
|
|
|