Home | History | Annotate | Download | only in disk_cache

Lines Matching refs:Stats

310   if (!stats_.Init(this, &data_->header.stats))
363 stats_.OnEvent(Stats::OPEN_MISS);
370 stats_.OnEvent(Stats::OPEN_MISS);
379 stats_.OnEvent(Stats::OPEN_HIT);
428 stats_.OnEvent(Stats::CREATE_ERROR);
436 stats_.OnEvent(Stats::CREATE_ERROR);
447 stats_.OnEvent(Stats::CREATE_ERROR);
468 stats_.OnEvent(Stats::CREATE_HIT);
515 stats_.OnEvent(Stats::DOOM_CACHE);
622 void BackendImpl::GetStats(StatsItems* stats) {
630 stats->push_back(item);
634 stats->push_back(item);
638 stats->push_back(item);
642 stats->push_back(item);
644 stats_.GetItems(stats);
778 stats_.OnEvent(Stats::DOOM_ENTRY);
869 int64 last_report = stats_.GetCounter(Stats::LAST_REPORT);
872 stats_.SetCounter(Stats::LAST_REPORT, Time::Now().ToInternalValue());
885 int64 use_hours = stats_.GetCounter(Stats::TIMER) / 120;
933 void BackendImpl::OnEvent(Stats::Counters an_event) {
938 stats_.OnEvent(Stats::TIMER);
939 int64 time = stats_.GetCounter(Stats::TIMER);
940 int64 current = stats_.GetCounter(Stats::OPEN_ENTRIES);
949 stats_.SetCounter(Stats::OPEN_ENTRIES, current);
950 stats_.SetCounter(Stats::MAX_ENTRIES, max_refs_);
963 // Save stats to disk at 5 min intervals.
1120 int64 errors = stats_.GetCounter(Stats::FATAL_ERROR);
1127 stats_.SetCounter(Stats::FATAL_ERROR, errors + 1);
1400 stats_.OnEvent(Stats::CREATE_MISS);
1411 stats_.OnEvent(Stats::CREATE_HIT);
1427 stats_.OnEvent(Stats::INVALID_ENTRY);
1508 StatsItems stats;
1509 GetStats(&stats);
1511 for (size_t index = 0; index < stats.size(); index++) {
1512 LOG(INFO) << stats[index].first << ": " << stats[index].second;
1522 static_cast<int>(stats_.GetCounter(Stats::OPEN_ENTRIES)));
1524 static_cast<int>(stats_.GetCounter(Stats::MAX_ENTRIES)));
1525 stats_.SetCounter(Stats::MAX_ENTRIES, 0);
1533 int64 total_hours = stats_.GetCounter(Stats::TIMER) / 120;
1536 int64 use_hours = stats_.GetCounter(Stats::LAST_REPORT_TIMER) / 120;
1537 stats_.SetCounter(Stats::LAST_REPORT_TIMER, stats_.GetCounter(Stats::TIMER));
1550 int64 trim_rate = stats_.GetCounter(Stats::TRIM_ENTRY) / use_hours;
1573 stats_.SetCounter(Stats::TRIM_ENTRY, 0);