Lines Matching defs:Stat
22 struct Stat {
23 Stat(const std::string& service,
40 bool Compare(const Stat& other) const {
49 bool operator()(Stat* lhs, Stat* rhs) const {
56 typedef std::set<Stat*, Stat::PtrCompare> StatSet;
74 // Enum to specify which field in Stat to increment in AddStat
91 Stat* stat = GetStat(service, interface, method, true);
92 DCHECK(stat);
94 ++stat->sent_method_calls;
96 ++stat->received_signals;
98 ++stat->sent_blocking_method_calls;
103 // Look up the Stat entry in |stats_|. If |add_stat| is true, add a new entry
105 Stat* GetStat(const std::string& service,
110 scoped_ptr<Stat> stat(new Stat(service, interface, method));
111 StatSet::iterator found = stats_.find(stat.get());
116 found = stats_.insert(stat.release()).first;
198 const Stat* stat = *cur_iter;
199 sent += stat->sent_method_calls;
200 received += stat->received_signals;
201 sent_blocking += stat->sent_blocking_method_calls;
202 // If this is not the last stat, and if the next stat matches the current
203 // stat, continue.
205 (*next_iter)->service == stat->service &&
206 (show < SHOW_INTERFACE || (*next_iter)->interface == stat->interface) &&
207 (show < SHOW_METHOD || (*next_iter)->method == stat->method))
216 line += stat->service;
219 line += stat->interface;
221 line += "." + stat->method;
271 Stat* stat = g_dbus_statistics->GetStat(service, interface, method, false);
272 if (!stat)
274 *sent = stat->sent_method_calls;
275 *received = stat->received_signals;
276 *blocking = stat->sent_blocking_method_calls;