In this implementation we measure time and count every method call

@param ProceedingJoinPointInterface $jointPoint
@return mixed
760269
public function interceptMethodCall(ProceedingJoinPointInterface $jointPoint) {
        $time = $this->monitor->getTime();

        if ($this->namePrefix) {
            $name = $this->namePrefix;
        } else {
            $name = get_class($jointPoint->getTarget());
        }
        if ($this->metricPerMethod) {
            $name .= '.' . $jointPoint->getMethodName();
        }

        try {
            $result = $jointPoint->proceed();
            $this->monitor->incrementTimer($name . self::SUFFIX_SUCCESS, $time);
            $this->monitor->incrementCounter($name . self::SUFFIX_SUCCESS);
            return $result;
        } catch (Exception $e) {
            $this->monitor->incrementTimer($name . self::SUFFIX_EXCEPTION, $time);
            $this->monitor->incrementCounter($name . self::SUFFIX_EXCEPTION);
            throw $e;
        }
    }
1358327
public function destroyClientSessionsOnRenewId(JoinPointInterface $joinPoint) {
		$session = $joinPoint->getProxy();
		$this->singleSignOnSessionManager->destroyRegisteredSsoClientSessions($session);
	}
141897
public function getFunctionPhaseRoot(ConnectionInterface $con = null)
    {
        if ($this->aFunctionPhaseRoot === null && ($this->function_phase_id !== null)) {
            $this->aFunctionPhaseRoot = ChildFunctionPhaseQuery::create()->findPk($this->function_phase_id, $con);
            /* The following can be used additionally to
                guarantee the related object contains a reference
                to this object.  This level of coupling may, however, be
                undesirable since it could result in an only partially populated collection
                in the referenced object.
                $this->aFunctionPhaseRoot->addRootSkills($this);
             */
        }

        return $this->aFunctionPhaseRoot;
    }
783258
private Object handleJoinPointCompletableFuture(ProceedingJoinPoint proceedingJoinPoint, io.github.resilience4j.ratelimiter.RateLimiter rateLimiter) {
		return rateLimiter.executeCompletionStage(() -> {
			try {
				return (CompletionStage<?>) proceedingJoinPoint.proceed();
			} catch (Throwable throwable) {
				throw new CompletionException(throwable);
			}
		});
	}
276275
public function getFunctionPhase(ConnectionInterface $con = null)
    {

        if ($this->singleFunctionPhase === null && !$this->isNew()) {
            $this->singleFunctionPhase = ChildFunctionPhaseQuery::create()->findPk($this->getPrimaryKey(), $con);
        }

        return $this->singleFunctionPhase;
    }
1005298
public static function getApiLimit(ResponseInterface $response)
    {
        $remainingCalls = self::getHeader($response, 'X-RateLimit-Remaining');

        if (null !== $remainingCalls && 1 > $remainingCalls) {
            throw new ApiLimitExceedException($remainingCalls);
        }

        return $remainingCalls;
    }
766908
public function interceptMethodCall(ProceedingJoinPointInterface $jointPoint) {
        try {
            return $jointPoint->proceed();
        } catch (Exception $e) {
            $methodName = $jointPoint->getMethodName();
            $partialTrace = array();
            $trace = $e->getTrace();
            $depth = 0;
            foreach ($trace as $entry) {
                if ($depth > $this->maxTraceDepth) {
                    $partialTrace[] = "... trace truncated";
                    break;
                }
                $file = isset($entry['file']) ? $entry['file'] : "";
                $function = isset($entry['function']) ? $entry['function'] : "";
                $line = isset($entry['line']) ? $entry['line'] : "";

                $partialTrace[] = sprintf("%s:%s:%s", $file, $function, $line);
                $depth++;
            }

            $msg = sprintf("Exception in %s:%s:%s (%d) %s", $e->getFile(), $e->getLine(), $methodName, $e->getCode(), $e->getMessage());
            $this->logger->logWarning($msg, implode("\n", $partialTrace));
            throw $e;
        }
    }
623363
public function process(
        ObjectInterface $object,
        ResolvedFixtureSet $fixtureSet,
        GenerationContext $context,
        MethodCallInterface $methodCall
    ): ResolvedFixtureSet {
        /** @var StaticReference $reference */
        $reference = $methodCall->getCaller();

        if (false === ($reference instanceof StaticReference)) {
            throw new \LogicException('TODO');
        }

        $result = $reference->getId()::{$methodCall->getMethod()}(...$methodCall->getArguments());

        if ($context->needsCallResult()) {
            $object = $object->withInstance($result);
        }

        return $fixtureSet->withObjects(
            $fixtureSet->getObjects()->with($object)
        );
    }
82018
public function getEndpoint($endpoint)
    {
        // Get Endpoint Class name
        $endpoint = studly_case($endpoint);

        if (!array_key_exists($endpoint, $this->endpoints)) {
            throw new InvalidEndpointException("Endpoint {$endpoint} does not exists");
        }

        $class = $this->endpoints[$endpoint];

        // Check if an instance has already been initiated
        if (isset($this->cachedEndpoints[$endpoint]) === false) {
            // check if class is an EndPoint
            $endpointClass = new \ReflectionClass($class);
            if (!$endpointClass->isSubclassOf('Atog\Api\Endpoint')) {
                throw new InvalidEndpointException("Class {$class} does not extend Atog\\Api\\Endpoint");
            }
            
            // check for model
            $model = new Model();
            if (array_key_exists('models', $this->config) && array_key_exists($endpoint, $this->config['models'])) {
                $modelClass = $this->config['models'][$endpoint];
                if (class_exists($modelClass)) {
                    $model = new $modelClass();
                }
            }
            $this->cachedEndpoints[$endpoint] = new $class($this, $model);
        }
        
        return $this->cachedEndpoints[$endpoint];
    }
31070
public function parse(AroundJoinPoint $joinPoint)
    {
        $class = get_parent_class($joinPoint->getTarget());
        $injectArgs = AnnotationManager::getMethodAnnotations($class, $joinPoint->getMethod(), InjectArg::class);
        $args = ClassObject::convertArgsToKV($class, $joinPoint->getMethod(), $joinPoint->getArgs());

        foreach($injectArgs as $injectArg)
        {
            $args[$injectArg->name] = $injectArg->value;
        }

        $args = array_values($args);

        return $joinPoint->proceed($args);
    }
1079205
private function handleRequest(MethodInterface $method)
    {
        $result = $this->client->sendRequest(
            $method,
            $method->getMethod(),
            $method->getAction(),
            $this->getOptions($method)
        );

        if ($method instanceof MethodResultCollectionInterface) {
            return $this->mapper->mapCollection($result, $method);
        }

        return $this->mapper->map($result, $method->createResultObject());
    }
994319
public function forwardSignalToDispatcher(JoinPointInterface $joinPoint)
    {
        $signalName = lcfirst(str_replace('emit', '', $joinPoint->getMethodName()));
        $this->dispatcher->dispatch($joinPoint->getClassName(), $signalName, $joinPoint->getMethodArguments());
    }
112010
protected function setCurrentEndpoint(EndpointInterface $Endpoint)
    {
        if (isset($this->currentEndPoint)){
            unset($this->lastEndPoint);
            $this->lastEndPoint = $this->currentEndPoint;
            unset($this->currentEndPoint);
        }
        $this->currentEndPoint = $Endpoint;
        return $this;
    }
1110729
public function getEngagementCount(
        Contact $contact,
        \DateTime $dateFrom = null,
        \DateTime $dateTo = null,
        $unit = 'm',
        ChartQuery $chartQuery = null
    ) {
        $event = new ContactSourceTimelineEvent($contact);
        $event->setCountOnly($dateFrom, $dateTo, $unit, $chartQuery);

        $this->dispatcher->dispatch(ContactSourceEvents::TIMELINE_ON_GENERATE, $event);

        return $event->getEventCounter();
    }
756541
public function diff(TimePoint $timepoint)
    {
        $interval = $this->date->diff($timepoint->date);
        $intervalSpec = $this->dateIntervalToIntervalSpec($interval);

        return new TimeInterval($intervalSpec);
    }
1088235
public static Method getMethodFromTarget(JoinPoint joinPoint) {
        Method method = null;
        if (joinPoint.getSignature() instanceof MethodSignature) {
            MethodSignature signature = (MethodSignature) joinPoint.getSignature();
            method = getDeclaredMethod(joinPoint.getTarget().getClass(), signature.getName(),
                    getParameterTypes(joinPoint));
        }
        return method;
    }
332031
protected function request(string $method, string $endpoint, $json = null)
    {
        $uri = $this->buildUri($endpoint);
        $options = $json != null ? ['json' => $json] : [];

        try {
            $response = $this->client->request($method, $uri, $options);
        } catch (ClientException $exception) {
            throw $this->determineException($exception);
        }

        $body = (string) $response->getBody();

        return $this->jsonValidator($body) ? json_decode($body, true) : $body;
    }