fpmas 1.6
Public Member Functions | List of all members
fpmas::utils::perf::ProbeBehavior Class Reference

#include <perf.h>

Inheritance diagram for fpmas::utils::perf::ProbeBehavior:
Inheritance graph
[legend]
Collaboration diagram for fpmas::utils::perf::ProbeBehavior:
Collaboration graph
[legend]

Public Member Functions

 ProbeBehavior (api::utils::perf::Monitor &monitor, api::model::Behavior &behavior, std::string probe_name)
 
void execute (api::model::Agent *agent) const override
 
virtual void execute (Agent *agent) const =0
 

Detailed Description

An api::model::Behavior implementation that wraps an other api::model::Behavior in order to estimate its execution time.

The ProbeBehavior can be safely used instead of the probed behavior (assigning the ProbeBehavior to an AgentGroup instead of the original behavior for example) without altering the Model execution.

Constructor & Destructor Documentation

◆ ProbeBehavior()

fpmas::utils::perf::ProbeBehavior::ProbeBehavior ( api::utils::perf::Monitor monitor,
api::model::Behavior behavior,
std::string  probe_name 
)

ProbeBehavior constructor.

Parameters
monitormonitor to which execution times will be committed
behaviorprobed behavior
probe_namename of the probe that is used to commit measures to the monitor. This name is also used to retrieve values using Monitor.callCount() and Monitor.totalDuration().

Member Function Documentation

◆ execute()

void fpmas::utils::perf::ProbeBehavior::execute ( api::model::Agent agent) const
overridevirtual

Executes the probed behavior on agent, probing and committing its execution time to the monitor.

Parameters
agentagent on which the probed behavior is executed

Implements fpmas::api::model::Behavior.


The documentation for this class was generated from the following files: