Esempio n. 1
0
 public static function fetchRealName($username)
 {
     profiler_instrument_begin('fetchRealName');
     $result = Profile::fetchRealName_($username);
     profiler_instrument_end('fetchRealName');
     return $result;
 }
Esempio n. 2
0
 public function countRegistrants()
 {
     profiler_instrument_begin('countRegistrants');
     global $cache;
     $cache_key = static::buildRegistrantsCountCacheKey($this->getId());
     $cache_value = $cache->get($cache_key);
     if ($cache_value === NULL) {
         $cache_value = count($this->getUsernames());
         $cache->set($cache_key, $cache_value);
     }
     profiler_instrument_end('countRegistrants');
     return $cache_value;
 }