hyperledger-archives / caliper

A blockchain benchmark framework to measure performance of multiple blockchain solutions
Apache License 2.0
74 stars 24 forks source link

Move test start time into first callback process #45

Closed nklincoln closed 6 years ago

nklincoln commented 6 years ago

Within the bench client, the start time is taken before the test rounds commence.

The cb.init() is run first and then the rounds progress.

Because the cb.init() may take some time, this means that the start time becomes invalid and consequently the rate control will not work as intended.

For example:

This pull request moves the setting of the start time used in the rate control into the round reduction loop, and is set on the first main test item.

haojun commented 6 years ago

That's reansonable, thanks