Home | History | Annotate | Download | only in base

Lines Matching refs:table

31 // locations in the table.
37 StatsTable table(kTableName, kMaxThreads, kMaxCounter);
41 int slot_id = table.RegisterThread(thread_name);
44 // Fill up the table with counters.
49 int counter_id = table.FindCounter(counter_name);
54 slot_id = table.RegisterThread("too many threads");
58 int counter_id = table.FindCounter(counter_base_name);
115 // Create a stats table.
120 StatsTable table(kTableName, kMaxThreads, kMaxCounter);
121 StatsTable::set_current(&table);
123 EXPECT_EQ(0, table.CountThreadsRegistered());
151 EXPECT_EQ(0, table.GetCounterValue(name));
154 table.GetCounterValue(name));
157 table.GetCounterValue(name));
160 table.GetCounterValue(name));
163 table.GetCounterValue(name));
164 EXPECT_EQ(0, table.CountThreadsRegistered());
177 StatsTable table(kMPTableName, 0, 0);
178 StatsTable::set_current(&table);
195 // Create a stats table.
199 StatsTable table(kMPTableName, kMaxProcs, kMaxCounter);
200 StatsTable::set_current(&table);
201 EXPECT_EQ(0, table.CountThreadsRegistered());
228 EXPECT_EQ(0, table.GetCounterValue(name));
231 table.GetCounterValue(name));
234 table.GetCounterValue(name));
237 table.GetCounterValue(name));
238 EXPECT_EQ(0, table.CountThreadsRegistered());
252 // Create a stats table.
257 StatsTable table(kTableName, kMaxThreads, kMaxCounter);
258 StatsTable::set_current(&table);
266 EXPECT_EQ(0, table.GetCounterValue("c:foo"));
270 EXPECT_EQ(123, table.GetCounterValue("c:foo"));
272 EXPECT_EQ(123, table.GetCounterValue("c:foo"));
274 EXPECT_EQ(122, table.GetCounterValue("c:foo"));
278 EXPECT_EQ(0, table.GetCounterValue("c:foo"));
280 EXPECT_EQ(100, table.GetCounterValue("c:foo"));
282 EXPECT_EQ(-1, table.GetCounterValue("c:foo"));
284 EXPECT_EQ(0, table.GetCounterValue("c:foo"));
288 EXPECT_EQ(-1, table.GetCounterValue("c:foo"));
290 EXPECT_EQ(-1, table.GetCounterValue("c:foo"));
292 EXPECT_EQ(0, table.GetCounterValue("c:foo"));
308 // Create a stats table.
312 StatsTable table(kTableName, kMaxThreads, kMaxCounter);
313 StatsTable::set_current(&table);
326 EXPECT_LE(500, table.GetCounterValue("t:bar"));
332 EXPECT_LE(1000, table.GetCounterValue("t:bar"));
337 // Create a stats table.
341 StatsTable table(kTableName, kMaxThreads, kMaxCounter);
342 StatsTable::set_current(&table);
348 EXPECT_EQ(0, table.GetCounterValue("c:baz"));
349 EXPECT_EQ(0, table.GetCounterValue("t:baz"));
355 EXPECT_EQ(1, table.GetCounterValue("c:baz"));
356 EXPECT_LE(500, table.GetCounterValue("t:baz"));
362 EXPECT_EQ(2, table.GetCounterValue("c:baz"));
363 EXPECT_LE(1000, table.GetCounterValue("t:baz"));
368 // Create a stats table.
373 StatsTable table(kTableName, kMaxThreads, kMaxCounter);
374 StatsTable::set_current(&table);
380 EXPECT_EQ(0, table.GetCounterValue("t:foo"));
381 EXPECT_EQ(0, table.GetCounterValue("t:bar"));
382 EXPECT_EQ(0, table.GetCounterValue("c:bar"));
390 EXPECT_LE(500, table.GetCounterValue("t:foo"));
391 EXPECT_LE(500, table.GetCounterValue("t:bar"));
392 EXPECT_EQ(1, table.GetCounterValue("c:bar"));
400 EXPECT_LE(1000, table.GetCounterValue("t:foo"));
401 EXPECT_LE(1000, table.GetCounterValue("t:bar"));
402 EXPECT_EQ(2, table.GetCounterValue("c:bar"));