Record the timing of a passed function against a group.  All Timings for a group are added up.

@param $function
@param $group
554615
public static function recordFunctionTimingForGroup($function, $group) {

        $functionTiming = CodeTimer::time($function);
        if (isset(CodeTimer::$groupTimings[$group])) {
            CodeTimer::$groupTimings[$group] += $functionTiming;
        } else {
            CodeTimer::$groupTimings[$group] = $functionTiming;
        }
    }
262625
public function setGroup($group, $feature)
    {
        if (!isset($this->_aGroup[$group])) {
            $this->_aGroup[$group] = array();
        }
        if (!in_array($feature, $this->_aGroup[$group])) {
            $this->_aGroup[$group][] = $feature;
        }
        return $this;
    }
45898
public function clearGroup($group)
    {
        $key = $this->_config['prefix'] . $group;
        if (isset($this->data[$key])) {
            $this->data[$key]['val'] += 1;
        }

        return true;
    }
134784
public function group($group){
        if(is_array($group)){
            $this->group= 'GROUP BY ';
            foreach ($group as $value) {
                $this->group .= $value.',';
            }
            $this->group= rtrim($this->group, ',');
            $this->group.=' ';
        }else{
            $this->group= 'GROUP BY '.$group.' ';
        }
    }
444306
private function addGroup($group)
	{
		if($group != null)
		{
			if($this->_groups == null)
				$this->_groups = array();
			$this->_groups[] = $group;
		}
	}
111707
public static function save_str($str, $group, $ext, $fsencoding = '') {
        return self::save($str, $group, $ext, $fsencoding);
    }
728360
private function addGroup($group)
	{
		if($group != null)
		{
			if($this->groups == null)
				$this->groups = array();
			$this->groups[] = $group;
		}
	}
337083
public function run($group = '')
    {
        if (!empty($this->validation_data) || $this->CI->input->method() === 'post') {
            $this->ran = true;
            return parent::run($group);
        }
        return false;
    }
816400
public function group(string $group, callable $callback)
    {
        $group = rtrim($group, '/');
        if (!$group) {
            return null;
        }

        $this->group = rtrim($this->group, '/') . $group ;
        $this->middleware->group($this->group);
        $callback($this);
        $this->resetGroup();
    }
1070295
public function addGroup(Group $group)
    {
        $this->hasGroupsProperty();

        if (!$this->groups->contains($group)) {
            $this->groups->add($group);
        }
    }
608264
private function immediateNotification(&$group, &$item)
    {
        $item->complete();

        $immediateNotification = false;

        if (is_object($group) === true) {
            if (intval($group->group_notifications) === 0) {
                $immediateNotification = true;
            }
        } else {
            $immediateNotification = true;
        }
        if ($immediateNotification === true) {
            $this->trigger(
                self::EVENT_DEFERRED_QUEUE_COMPLETE,
                new DeferredQueueCompleteEvent($item)
            );
        }
    }
1331066
public function commitAsync( string $group = "default" )
	{
		$list = [];
		$requests = @$this->async_requests[$group] ?: [];

		/** @var AsyncRequest $request */
		foreach ($requests as $request)
			$list[] = $request->getPromise();

		unset($this->async_requests[$group]);
		settle($list)->wait();
	}
1012865
public function run($module = '', $group = '')
    {
        if (is_object($module)) {
            $this->CI = &$module;
        }
        return parent::run($group);
    }
374207
public static function group_deleted($event) {
        if (!empty(self::$resetinprogress)) {
            // We will take care of that once the course reset ends.
            return;
        }
        assign_process_group_deleted_in_course($event->courseid, $event->objectid);
    }
1165635
public function addTypePreCallFunction($type, callable $function)
    {
        if (isset($this->alias[$type])) {
            foreach ($this->alias[$type] as $target) {
                $this->addTypePreCallFunction($target, $function);
            }
            return;
        }

        $this->tPreCallFunctions[$type][] = $function;
    }
242244
protected function visitFunction(Node $function)
    {
        $this->metrics['functions']++;

        if ($function instanceof Node\Expr\Closure) {
            $this->metrics['anonymousFunctions']++;
        } else {
            $this->metrics['namedFunctions']++;
        }
    }
1040723
public static function timeFunction($function, $description = null) {

        $duration = self::time($function);

        Logger::log("Code Block " . ($description ? '"' . $description . '"' : "") . " Executed in " . $duration . " Seconds");

        return $duration;
    }