bistaastha / caliper

A blockchain benchmark framework to measure performance of multiple blockchain solutions https://wiki.hyperledger.org/display/caliper
https://hyperledger.github.io/caliper/
Apache License 2.0
1 stars 0 forks source link

Issues to fix #1

Closed aklenik closed 2 years ago

aklenik commented 3 years ago

1. Non-functional issues

  1. Copy-paste error: Minimum -> Maximum https://github.com/bistaastha/caliper/blob/78dad7370c91626fa613df695a6b27ccc056ffec/packages/caliper-core/lib/worker/workload/declarative/value-providers/uniform-random-value-provider.js#L51-L55
  2. No need to wrap simple function calls, const result = valueProvider.generateValue(); is enough, and then expect(result).... Same goes for other test cases. https://github.com/bistaastha/caliper/blob/78dad7370c91626fa613df695a6b27ccc056ffec/packages/caliper-core/test/worker/workload/declarative/value-providers/uniform-random-value-provider.test.js#L65-L71
  3. Repeating code should be encapsulated in a separate/reusable function https://github.com/bistaastha/caliper/blob/78dad7370c91626fa613df695a6b27ccc056ffec/packages/caliper-core/test/worker/workload/declarative/value-providers/uniform-random-value-provider.test.js#L69-L74

2. Small issues/enhancements

  1. Error message should be less technical, e.g., "incorrect variable name" https://github.com/bistaastha/caliper/blob/78dad7370c91626fa613df695a6b27ccc056ffec/packages/caliper-core/lib/worker/workload/declarative/value-providers/variable-reference-value-provider.js#L33-L40
  2. Error message should be more specific, e.g., which variable (and not parameter) name is not found. https://github.com/bistaastha/caliper/blob/78dad7370c91626fa613df695a6b27ccc056ffec/packages/caliper-core/lib/worker/workload/declarative/value-providers/variable-reference-value-provider.js#L42-L44
  3. Error message should be less technical, e.g., "incorrect parameter name" https://github.com/bistaastha/caliper/blob/78dad7370c91626fa613df695a6b27ccc056ffec/packages/caliper-core/lib/worker/workload/declarative/value-providers/parameter-reference-value-provider.js#L33-L40
  4. Error message should be more specific, e.g., which parameter name is not found. https://github.com/bistaastha/caliper/blob/78dad7370c91626fa613df695a6b27ccc056ffec/packages/caliper-core/lib/worker/workload/declarative/value-providers/parameter-reference-value-provider.js#L42-L44
bistaastha commented 3 years ago

Resolved!