plugins.aea-cli-benchmark.aea_
cli_
benchmark.case_
tx_
generate.case
Ledger TX generation and processing benchmark.
LedgerApiHandler Objects
class LedgerApiHandler(Handler)
Dummy handler to handle messages.
setup
def setup() -> None
Noop setup.
teardown
def teardown() -> None
Noop teardown.
handle
def handle(ledger_api_msg: Message) -> None
Handle incoming message.
GenericSigningHandler Objects
class GenericSigningHandler(Handler)
Implement the signing handler.
setup
def setup() -> None
Implement the setup for the handler.
handle
def handle(message: Message) -> None
Implement the reaction to a message.
Arguments:
message
: the message
teardown
def teardown() -> None
Implement the handler teardown.
Case Objects
class Case()
TBenchmark case implementation.
__
init__
def __init__(ledger_id: str, ledger_api_config: Dict, private_keys: Dict)
Init case.
Arguments:
ledger_id
: str, ledger id, one of fetchai, ethereumledger_api_config
: config for ledger connectionprivate_keys
: private keys dict to use for wallet contruction
ledger_
handler
@property
def ledger_handler() -> LedgerApiHandler
Get ledger api handler instance.
tx_
settled_
counter
@property
def tx_settled_counter() -> int
Get amount of txs settled.
wait_
tx_
settled
def wait_tx_settled() -> None
Wait for tx settled.
ledger_
api_
dialogues
@property
def ledger_api_dialogues() -> LedgerApiDialogues
Get ledger api dialogues.
my_
addr
@property
def my_addr() -> str
Get my agent address.
make_
ledger_
msg
def make_ledger_msg(sender_address: str,
counterparty_address: str) -> LedgerApiMessage
Make ledger api message to be signed and published over ledger netework.
start_
agent
def start_agent() -> None
Construct and start agent.
stop_
agent
def stop_agent() -> None
Stop agent.
put_
message_
and_
wait
def put_message_and_wait(msg: Message) -> None
Put ledger api message and wait tx constructed, signed and settled.
run
def run(time_in_seconds: float) -> Tuple[int, float]
Run a test case.
run
def run(ledger_id: str,
running_time: float) -> List[Tuple[str, Union[int, float]]]
Check tx processing speed.