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

compositeRate issue #1181

Closed
3 tasks
wvans123 opened this issue Dec 3, 2021 · 4 comments · Fixed by #1184
Closed
3 tasks

compositeRate issue #1181

wvans123 opened this issue Dec 3, 2021 · 4 comments · Fixed by #1184
Assignees
Labels
bug Something isn't working
Milestone

Comments

@wvans123
Copy link

wvans123 commented Dec 3, 2021

about RateControl's compositeRate roundConfig issus

Context

I can't find the roundConfig in rateInterface but it is used in compositeRate.js and get error message

Expected Behavior

success and get some message

Actual Behavior

return error meesage about this.roundConfig(in compositeRate.js row 120,135...)

Possible Fix

may be in rateInterface define a property; but another issue also exist in new RateControl(arg0,arg1,arg2,...) error (in row 149,159)

Steps to Reproduce

Existing issues

Context

Your Environment

  • Version used: 0.4.2
  • Environment name and version (e.g. Chrome 39, node.js 5.4): nodejs v8.17.0
  • Operating System and version (desktop or mobile):linux 4.15.0-162-generic
  • Link to your project:
@aklenik
Copy link
Contributor

aklenik commented Dec 7, 2021

@wvans123 Can you please share your benchmark configuration file content?

@aklenik aklenik added the question Further information is requested label Dec 7, 2021
@wvans123
Copy link
Author

wvans123 commented Dec 8, 2021

@aklenik thank you for answering my question, this is my benchmark configuration

simpleArgs: &simple-args
initialMoney: 10000
moneyToTransfer: 100
numberOfAccounts: &number-of-accounts 1000

test:
    name: simple
description: >-
    This is an example benchmark for Caliper, to test the backend DLT's
    performance with simple account opening & querying transactions.
    workers:
        type: local
        number: 1
    rounds:
        - label: open
        description: >-
            Test description for the opening of an account through the deployed
            contract.
        txDuration: 30
        rateControl:{
            type: "composite-rate"
            opts:{
                "weights" : [1,2],
                "rateControllers" : [
                    {
                        "type" : "fixed-rate",
                        "opts" : {"tps" : 200}
                    },
                    {
                        "type" : "fixed-rate",
                        "opts" : {"tps" : 400}
                    }
                ],
                "logChange" : true
            }
       } 
        workload:
            module: benchmarks/scenario/simple/open.js
            arguments: *simple-args

@aklenik aklenik added bug Something isn't working and removed question Further information is requested labels Dec 8, 2021
@aklenik
Copy link
Contributor

aklenik commented Dec 8, 2021

There are several bugs indeed:

  1. A name refactoring from roundConfig to testMessage in the base RateInterface was not applied in the CompositeRateController class.
  2. Creation of sub-controllers were not honoring the new RateControl API

@aklenik aklenik self-assigned this Dec 8, 2021
aklenik added a commit to aklenik/caliper that referenced this issue Dec 8, 2021
* Rename old "roundConfig" references to the new "testMessage"
* Extend TestMessage class with some functions to allow modification by CompositeRateController
* Fix passed arguments to the new RateControl constructor when creating subcontrollers
* Add a composite rate controller to one of the Fabric CI phases

Signed-off-by: Attila Klenik <a.klenik@gmail.com>
aklenik added a commit that referenced this issue Dec 9, 2021
* Rename old "roundConfig" references to the new "testMessage"
* Extend TestMessage class with some functions to allow modification by CompositeRateController
* Fix passed arguments to the new RateControl constructor when creating subcontrollers
* Add a composite rate controller to one of the Fabric CI phases

Signed-off-by: Attila Klenik <a.klenik@gmail.com>
@davidkel davidkel added this to the v0.5.0 milestone Mar 2, 2022
@LPmofeng
Copy link

@aklenik thank you for answering my question, this is my benchmark configuration

simpleArgs: &simple-args
initialMoney: 10000
moneyToTransfer: 100
numberOfAccounts: &number-of-accounts 1000

test:
    name: simple
description: >-
    This is an example benchmark for Caliper, to test the backend DLT's
    performance with simple account opening & querying transactions.
    workers:
        type: local
        number: 1
    rounds:
        - label: open
        description: >-
            Test description for the opening of an account through the deployed
            contract.
        txDuration: 30
        rateControl:{
            type: "composite-rate"
            opts:{
                "weights" : [1,2],
                "rateControllers" : [
                    {
                        "type" : "fixed-rate",
                        "opts" : {"tps" : 200}
                    },
                    {
                        "type" : "fixed-rate",
                        "opts" : {"tps" : 400}
                    }
                ],
                "logChange" : true
            }
       } 
        workload:
            module: benchmarks/scenario/simple/open.js
            arguments: *simple-args

Has this issue been resolved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants