Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The record-rate controller in documentation's samples doesn't work. #1131

Closed
chasecheese opened this issue Mar 29, 2021 · 1 comment · Fixed by #1292
Closed

The record-rate controller in documentation's samples doesn't work. #1131

chasecheese opened this issue Mar 29, 2021 · 1 comment · Fixed by #1292
Assignees
Labels
bug Something isn't working component/core Related to the core code-base
Milestone

Comments

@chasecheese
Copy link

chasecheese commented Mar 29, 2021

Try to use record-rate in Caliper v0.4.2 testing fabric, but get errors.

Context

I wrote the config according to the samples in doc, but it doesn't work. I'm testing fabric using caliperv0.4.2

Actual Behavior

I get errors:

Possible Fix

Would you please update the part of doc? How to use record-rate and replay-rate in v0.4.2.

Steps to Reproduce

  1. wrote the benchmarkconfig.yaml
test:
    name: basic-contract-benchmark
    description: test benchmark
    workers:
      type: local
      number: 4
    rounds:
      - label: 50TpsAsset
        description: Read asset benchmark
        txDuration: 10

        rateControl: {
          "type": "record-rate",
          "opts": {
            "rateController": {
              "type": "fixed-rate",
              "opts": {"tps" : 100}
            },
            "pathTemplate": "../tx_records_client<C>_round<R>.txt",
            "outputFormat": "TEXT",
            "logEnd": true
          }
        }
        workload:
          module: workload/readAsset.js
          arguments:
            assets: 10
            contractId: basic

2.run caliper npx caliper launch manager --caliper-workspace ./ --caliper-networkconfig ./networks/networkConfig.yaml --caliper-benchconfig ./benchmarks/benchmarkconfig.yaml --caliper-flow-only-test --caliper-fabric-gateway-enabled
3.get error:
image

Your Environment

  • Version used: Caliper v0.4.2(installed via npm) fabirc2.0.0
  • Environment name and version (e.g. Chrome 39, node.js 5.4):
  • Operating System and version : Ubuntu20.04/16.04 amd64
@davidkel
Copy link
Contributor

davidkel commented Apr 9, 2021

This looks like a bug in the RecordRate implementation, specifically this line in the constructor

        this.rateController = new RateControl(testMessage, stats, workerIndex,);

It's passing back the original test message where as it should be creating a new TestMessage instance based on this.options.rateController
Unfortunately that means currently in 0.4.2 the record rate controller is not usable

@davidkel davidkel added bug Something isn't working component/core Related to the core code-base labels Apr 14, 2021
@davidkel davidkel added this to the v0.5.0 milestone Mar 2, 2022
@davidkel davidkel self-assigned this Mar 25, 2022
davidkel added a commit to davidkel/caliper that referenced this issue Mar 30, 2022
Addresses the record rate controller as it doesn't work and causes a
node stack overflow

closes hyperledger#1131

Signed-off-by: D <d_kelsey@uk.ibm.com>
davidkel added a commit that referenced this issue Apr 6, 2022
Addresses the record rate controller as it doesn't work and causes a
node stack overflow

closes #1131

Signed-off-by: D <d_kelsey@uk.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component/core Related to the core code-base
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants