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

Add fixed-load rate controller to calliper generator #1592

Merged
merged 6 commits into from
Jul 1, 2024

Conversation

duckling69
Copy link
Contributor

fixes #1587

@duckling69 duckling69 requested a review from a team June 4, 2024 13:10
Copy link

codecov bot commented Jun 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.04%. Comparing base (8ec4e00) to head (7a3570e).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1592      +/-   ##
==========================================
+ Coverage   56.01%   56.04%   +0.02%     
==========================================
  Files         105      105              
  Lines        4508     4511       +3     
  Branches      691      691              
==========================================
+ Hits         2525     2528       +3     
  Misses       1426     1426              
  Partials      557      557              
Flag Coverage Δ
caliper-core 45.15% <ø> (ø)
caliper-fabric 80.36% <ø> (ø)
generator-caliper 84.03% <100.00%> (+0.41%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@davidkel
Copy link
Contributor

davidkel commented Jun 5, 2024

@duckling69 Hi thanks for the contribution, please could you add unit tests to please otherwise we can't accept the PR and as you can see the code coverage has reduced with the addition of the new code.

Signed-off-by: Vivek jha <[email protected]>
@duckling69
Copy link
Contributor Author

@davidkel did the review changes

Copy link
Contributor

@davidkel davidkel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also include this as an option when running the yo generator. see around lines 101-106 of index.js to update

@@ -272,6 +272,10 @@ module.exports = class extends Generator {
answersObject.opts = 'tps: 100, unfinished_per_client: 100';
this._configWrite();
break;
case 'fixed-load':
answersObject.opts = 'startTps:10, transactionLoad:20';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we have a single space added between property and value so that it's consistent with the others, ie
startTps: 10, transactionLoad: 20

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -104,6 +104,7 @@ module.exports = class extends Generator {
{name: 'Fixed Backlog', value: 'fixed-backlog'},
{name: 'Linear Rate', value: 'linear-rate'},
{name: 'Fixed Feedback Rate', value: 'fixed-feedback-rate'}
{name: 'Fixed Load', value: "fixed-load"}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please run the tests locally before submitting a PR. Doing so will quickly catch bugs in your submission. Here the build fails because you put a bug into the code, you are missing a , at the end of line 106

Copy link
Contributor

@davidkel davidkel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please fix the bug in index.js

Signed-off-by: Vivek jha <[email protected]>
Signed-off-by: Vivek jha <[email protected]>
@duckling69 duckling69 requested a review from davidkel June 18, 2024 17:12
Copy link
Contributor

@davidkel davidkel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, many thanks for the contribution

@davidkel davidkel merged commit 08f732a into hyperledger-caliper:main Jul 1, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Caliper generator doesn't support the fixed-load rate controller
2 participants