fixed-asset-base benchmarks fail to run on test-network
davidkel opened this issue · 1 comments
The fixed asset base (ie non-contract) benchmarks define the chaincodeId as follows
chaincodeID: fixed-asset-base
So we must deploy with that chaincode ID, however the benchmark code has hardcoded fixed-asset as the chaincode ID in helper.js as well as some of the workload implementation which means that they would not work.
What I don't understand is why we have a set of benchmarks for base and a set for contract when essentially they are benchmarking a chaincode that should look identical externally just 2 ways of implementing it (ie using contract-api and not using contract-api)
We should
- Have a single set of benchmark files for use by base and contract
- rename the lib directory to workload
- probaby delete sample.sh as I don't know why they exist
testing of the fixed-asset-base implementation can be done by deploying as fixed-asset and then using the contract based benchmarks for now
This cleanup should update the readme for fabric networks (once merged) to adjust to the new directory structure
FInal decision on what will be done
In the benchmarks/api/fabric directory we can do some cleanup
- delete sample.sh
- Apart from helper.js all the .js files should have this line in the initializeWorkloadModule method
this.chaincodeID = args.chaincodeID ? args.chaincodeID : 'fixed-asset';
and in the constructor
this.chaincodeID = '';
So that all the workload modules are consistent in how the chaincodeID is set - We should be able to delete the api/fabric/base directory and move the files in contract into the api/fabric directory
- rename lib to workloads
- update the newly moved benchmarks in api/fabric to the changed location for the workload files
- update the README.md in networks/fabric to point to the new location for the benchmark files