Skip to content

Commit

Permalink
Add txObservers and make use of TXN Stats Collector
Browse files Browse the repository at this point in the history
  • Loading branch information
nklincoln committed Aug 12, 2020
1 parent c84d59f commit e9aa4fc
Show file tree
Hide file tree
Showing 73 changed files with 2,899 additions and 3,004 deletions.
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',
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

0 comments on commit e9aa4fc

Please sign in to comment.