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 txObservers and make use of TXN Stats Collector object #943

Merged
merged 1 commit into from
Aug 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/caliper-cli/lib/launch/lib/launchWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

'use strict';

const { CaliperUtils, ConfigUtil, Constants, MessageHandler } = require('@hyperledger/caliper-core');
const { CaliperUtils, ConfigUtil, Constants, WorkerMessageHandler } = require('@hyperledger/caliper-core');
const BindCommon = require('./../../lib/bindCommon');
const logger = CaliperUtils.getLogger('cli-launch-worker');

Expand Down Expand Up @@ -79,7 +79,7 @@ class LaunchWorker {
* @type {MessengerInterface}
*/
const messenger = messengerFactory({});
const messageHandler = new MessageHandler(messenger, connectorFactory);
const messageHandler = new WorkerMessageHandler(messenger, connectorFactory);

await messenger.initialize();
await messenger.configureProcessInstances([process]);
Expand Down
2 changes: 1 addition & 1 deletion packages/caliper-core/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports.TxStatus = require('./lib/common/core/transaction-status');
module.exports.CaliperUtils = require('./lib/common/utils/caliper-utils');
module.exports.Version = require('./lib/common/utils/version');
module.exports.ConfigUtil = require('./lib/common/config/config-util');
module.exports.MessageHandler = require('./lib/worker/message-handler');
module.exports.WorkerMessageHandler = require('./lib/worker/worker-message-handler');
module.exports.MessengerInterface = require('./lib/common/messengers/messenger-interface');
module.exports.CaliperEngine = require('./lib/manager/caliper-engine');
module.exports.MonitorOrchestrator = require('./lib/manager/orchestrators/monitor-orchestrator');
Expand Down
15 changes: 13 additions & 2 deletions packages/caliper-core/lib/common/config/Config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,22 @@ const keys = {
Transparency: 'caliper-report-charting-transparency'
}
},
Progress: {
Reporting: {
Enabled: 'caliper-progress-reporting-enabled',
Copy link
Contributor

Choose a reason for hiding this comment

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

The enabled flag could be derived from interval !== 0. But I'm also fine with this explicit flag.

Interval: 'caliper-progress-reporting-interval'
}
},
Monitor: {
DefaultInterval: 'caliper-monitor-default-interval'
},
Workspace: 'caliper-workspace',
ProjectConfig: 'caliper-projectconfig',
UserConfig: 'caliper-userconfig',
MachineConfig: 'caliper-machineconfig',
BenchConfig: 'caliper-benchconfig',
NetworkConfig: 'caliper-networkconfig',
TxUpdateTime: 'caliper-txupdatetime',
MonitorConfig: 'caliper-monitorconfig',
LoggingRoot: 'caliper-logging',
Logging: {
Template: 'caliper-logging-template',
Expand Down Expand Up @@ -92,7 +101,9 @@ const keys = {
Method: 'caliper-worker-communication-method',
Address: 'caliper-worker-communication-address',
},
MaxTxPromises: 'caliper-worker-maxtxpromises'
Update: {
Interval: 'caliper-worker-update-interval'
}
},
Flow: {
Skip: {
Expand Down
21 changes: 16 additions & 5 deletions packages/caliper-core/lib/common/config/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,18 @@ caliper:
benchconfig:
# Path to the blockchain configuration file that contains information required to interact with the SUT
networkconfig:
# Sets the frequency of the progress reports in milliseconds
txupdatetime: 5000
# Configurations related to caliper test progress
progress:
# Progress reports
reporting:
# Enable the reporting action
enabled: true
# Reporting frequency
interval: 5000
# Configurations related to caliper test monitors
monitor:
# Default update interval
defaultinterval: 5000
# Configurations related to the logging mechanism
logging:
# Specifies the message structure through placeholders
Expand Down Expand Up @@ -114,15 +124,16 @@ caliper:
worker:
# Indicate if workers are in distributed mode
remote: false
# Polling interval to use once created, in milliseconds
pollinterval: 5000
# Worker communication details
communication:
# Method used (process | mqtt)
method: process
# Address used for mqtt communications
address: mqtt://localhost:1883
maxtxpromises: 100
# Worker update configuration
update:
# update interval for sending round statistics to the manager
interval: 1000
# Caliper flow options
flow:
# Skip options
Expand Down
Loading