You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Caliper uses user modules (or user test modules) to allow arbitrary workload logic to be plugged in. The user module must export the three required functions to be able to interact with Caliper. This design is not object-oriented and should be refactored.
Expected Behavior
The proposal is to require only an exported factory function (e.g., createUserModule) from the user module JS file. This way the developer has more freedom to structure the implementation and explicitly manage the life-cycle of the user module instance.
Corresponding documentation must also be provided that describes the general API of user modules.
Possible Fix
The src/comm/client/local-client.js/run* functions must be refactored to use the new factory function of the referenced modules.
Additionally, the provided example user modules (in the benchmark/ directory) must also be refactored.
The text was updated successfully, but these errors were encountered:
Context
Caliper uses user modules (or user test modules) to allow arbitrary workload logic to be plugged in. The user module must export the three required functions to be able to interact with Caliper. This design is not object-oriented and should be refactored.
Expected Behavior
The proposal is to require only an exported factory function (e.g.,
createUserModule
) from the user module JS file. This way the developer has more freedom to structure the implementation and explicitly manage the life-cycle of the user module instance.Corresponding documentation must also be provided that describes the general API of user modules.
Possible Fix
The
src/comm/client/local-client.js/run*
functions must be refactored to use the new factory function of the referenced modules.Additionally, the provided example user modules (in the
benchmark/
directory) must also be refactored.The text was updated successfully, but these errors were encountered: