chore: group Dependabot updates per ecosystem
Add a Dependabot config covering gomod, npm, docker, github-actions, grouping both version and security updates so each ecosystem gets at most one PR per run.
Assisted-by: anthropic:claude-fable-5 Signed-off-by: Ry Jones ry@linux.com
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802047560号
FireFly Performance CLI
FireFly Performance CLI is a HTTP load testing tool that generates a constant request rate against a FireFly network and measure performance. This is used to confirm confidence that FireFly can perform under normal conditions for an extended period of time.
Items Subject to Testing
POST /messages/broadcasts)POST /messages/private)POST /tokens/mint)POST /contracts/invoke)Build
The
ffperfCLI needs building before you can use it.Run
make installin the root directory to build and install theffperfcommand.Run
The test configuration is structured around running
ffperfas either a single process or in a distributed fashion as multiple processes.The tool has 2 basic modes of operation:
ffperftool loads information about the FireFly endpoint(s) to test by reading from a FireFlystack.jsonfile on the local system. The location of thestack.jsonfile is configured in theinstances.yamlfile by setting thestackJSONPathoption.ffperftool connects to a FireFly instance running on a different system. Since there won’t be a FireFlystack.jsonon the system whereffperfis running the nodes to test must be configured in theinstances.yamlfile by settings theNodesoption.Local FireFly stack
See the
Getting Startedguide for help running tests against a local stack.In the test configuration you define one or more test instances for a single
ffperfprocess to run. An instance then describes running one or more test cases with a dedicated number of goroutine workers against a sender org and a recipient org. The test configuration consumes a file reference to the stack JSON configuration produced by theffCLI (or can be defined manually) to understand the network topology, so that sender’s and recipient’s just refer to indices within the stack.As a result, running the CLI consists of providing an
instances.yamlfile describe the test configuration and an instance index or name indicating which instance the process should run:See
example-instances.yamlfor examples of how to define multiple instances and multiple test cases per instance with all the various options.Remote FireFly node
See the
Getting Started with Remote Nodesguide for help running tests against a remote FireFly node.In the test configuration you define one or more test instances for a single
ffperfprocess to run. An instance then describes running one or more test cases with a dedicated number of goroutine workers. Instead of setting a sender org and recipient org (because there is no local FireFlystack.jsonto read) the instance must be configured to use aNodethat has been defined ininstances.yaml.Currently the types of test that can be run against a remote node are limited to those that only invoke a single endpoint. This makes it most suitable for test types
token_mint,custom_ethereum_contractandcustom_fabric_contractsince these don’t need responses to be received from other members of the FireFly network.To provide authentication when authenticating against a node endpoint, you can provide either of the following credentials in the
instances.yamlunder eachnodeentry:authTokenvalueauthUsernameandauthPasswordvaluesAs a result, running the CLI consists of providing an
instances.yamlfile describe the test configuration and an instance index or name indicating which instance the process should run:See
example-remote-node-instances-fungible.yamlandexample-remote-node-instances-nonfungible.yamlfor examples of how to define nodes manually and configure test instances to use them.Command line options
Metrics
The
ffperftool registers the following metrics for prometheus to consume:Useful features
The
ffperftool is designed to let you run various styles of test. The default behaviour for a local stack will exercise a local FireFly stack for 500 hours or until an error occurs. Theprep.shscript will help you create and run this comprehensive test to validate a local installation of FireFly.There are various options for creating your own customized tests. A full list of configuration options can be seen at
conf.gobut some useful options are outlined below:maxActionsattribute (defaults to0i.e. unlimited).maxActionstest actions (e.g. token mints) have taken place the test will shut down.delinquentActionattribute (defaults toexit).exitcauses the test to end if an error occurs. Set tologto simply log the error and continue the test.lengthattribute.lengthattribute to a time duration (e.g.3h) will cause the test to run for that long or until an error occurs (seedelinquentAction).ffperfcommand with-dor--daemon, or setting the globaldaemonvalue totruein theinstances.yamlfile). In daemon mode the test will run untilmaxActionshas been reached or an error has occurred anddelinquentActionsis set to true.startRate,endRateandrateRampUpTimeattribute of a test instance.0which has the effect of not limiting the rate of the test.startRateactions to happen per second. Over the period ofrateRampUpTimeseconds the allowed rate will increase linearly untilendRateactions per seconds are reached. At this point the test will continue atendRateactions per second until the test finishes.startRateis the only value that is set, the test will run at that rate for the entire test.noWaitSubmission(defaults tofalse).trueeach worker routine will perform its action (e.g. minting a token) and wait for confirmation of that event before doing its next action.maxSubmissionsPerSecondcan be used to control the maximum number of submissions per second to avoid overloading the system under test.supportsDataandsupportsURIattributes of a test instance.supportsDatadefaults totruesince the sample token contract used by FireFly supports minting tokens with data. When set totruethe message included in the mint transaction will include the ID of the worker routine and used to correlate received confirmation events.supportsURIdefaults totruefor nonfungible tokens. This attribute is ignored for fungible token tests. If set totruethe ID of a worker routine will be set in the URI and used to correlate received confirmation events.noWaitSubmissionis set totrue.mintRecipientaddress to equal the expected value. Since a test might be run several times with the same address the test gets the balance at the beginning of the test, and then again at the end. The difference is expected to equal the value ofmaxActions. To enable this check set themaxTokenBalanceWaittoken option the length of time to wait for the balance to be reached. IfmaxTokenBalanceWaitis not set the test will not check balances.actionsPerLoopfor the test. This can be helpful when you want to scale the number of actions done in parallel without having to scale the number of workers. The default value is1for this attribute. If setting to a value >1it is recommended to havenoWaitSubmissionto setfalse.Distributed Deployment
See the
ffperfHelm chart for running multiple instances offfperfusing Kubernetes.