Skip to content

Commit

Permalink
Merge pull request hyperledger#80 from Lynn14m/pd_benchmarks
Browse files Browse the repository at this point in the history
Private data benchmarks
  • Loading branch information
nklincoln committed Jun 11, 2020
2 parents 2143577 + 623f3a9 commit 38a647d
Show file tree
Hide file tree
Showing 20 changed files with 1,965 additions and 5 deletions.
130 changes: 130 additions & 0 deletions benchmarks/api/fabric/couchDB/contract/create-private-asset.yaml
@@ -0,0 +1,130 @@
---
test:
name: create-private-asset-size-ramp-couchDB
description: This is a duration based benchmark targeting a Hyperledger Fabric network with a CouchDB world state database using the `fixed-asset` NodeJS chaincode contract that is interacted with via
a Fabric-SDK-Node Gateway. Each test round invokes the `createPrivateAsset` method, with successive rounds increasing the bytesize of the asset
added into the Private data store.
workers:
type: local
number: 5
rounds:
- label: create-private-asset-8000-fixed-tps
description: Test a submitTransaction() Gateway method against the NodeJS `fixed-asset` Smart Contract method named `createPrivateAsset`, which inserts an asset of size 8000 bytes into the Private data store at a fixed TPS rate.
chaincodeID: fixed-asset
txDuration: 300
rateControl: { type: fixed-rate, opts: { tps: 15} }
arguments:
chaincodeID: fixed-asset
bytesize: 8000
callback: benchmarks/api/fabric/lib/create-private-asset.js
- label: create-private-asset-100
description: Test a submitTransaction() Gateway method against the NodeJS `fixed-asset` Smart Contract method named `createPrivateAsset`, which inserts an asset of size 100 bytes into the Private data store.
chaincodeID: fixed-asset
txDuration: 300
rateControl: { type: fixed-backlog, opts: { unfinished_per_client: 10, startingTps: 1} }
arguments:
chaincodeID: fixed-asset
bytesize: 100
callback: benchmarks/api/fabric/lib/create-private-asset.js
- label: create-private-asset-200
description: Test a submitTransaction() Gateway method against the NodeJS `fixed-asset` Smart Contract method named `createPrivateAsset`, which inserts an asset of size 200 bytes into the Private data store.
chaincodeID: fixed-asset
txDuration: 300
rateControl: { type: fixed-backlog, opts: { unfinished_per_client: 10, startingTps: 1} }
arguments:
chaincodeID: fixed-asset
bytesize: 200
callback: benchmarks/api/fabric/lib/create-private-asset.js
- label: create-private-asset-500
description: Test a submitTransaction() Gateway method against the NodeJS `fixed-asset` Smart Contract method named `createPrivateAsset`, which inserts an asset of size 500 bytes into the Private data store.
chaincodeID: fixed-asset
txDuration: 300
rateControl: { type: fixed-backlog, opts: { unfinished_per_client: 10, startingTps: 1} }
arguments:
chaincodeID: fixed-asset
bytesize: 500
callback: benchmarks/api/fabric/lib/create-private-asset.js
- label: create-private-asset-1000
description: Test a submitTransaction() Gateway method against the NodeJS `fixed-asset` Smart Contract method named `createPrivateAsset`, which inserts an asset of size 1000 bytes into the Private data store.
chaincodeID: fixed-asset
txDuration: 300
rateControl: { type: fixed-backlog, opts: { unfinished_per_client: 10, startingTps: 1} }
arguments:
chaincodeID: fixed-asset
bytesize: 1000
callback: benchmarks/api/fabric/lib/create-private-asset.js
- label: create-private-asset-2000
description: Test a submitTransaction() Gateway method against the NodeJS `fixed-asset` Smart Contract method named `createPrivateAsset`, which inserts an asset of size 2000 bytes into the Private data store.
chaincodeID: fixed-asset
txDuration: 300
rateControl: { type: fixed-backlog, opts: { unfinished_per_client: 10, startingTps: 1} }
arguments:
chaincodeID: fixed-asset
bytesize: 2000
callback: benchmarks/api/fabric/lib/create-private-asset.js
- label: create-private-asset-5000
description: Test a submitTransaction() Gateway method against the NodeJS `fixed-asset` Smart Contract method named `createPrivateAsset`, which inserts an asset of size 5000 bytes into the Private data store.
chaincodeID: fixed-asset
txDuration: 300
rateControl: { type: fixed-backlog, opts: { unfinished_per_client: 10, startingTps: 1} }
arguments:
chaincodeID: fixed-asset
bytesize: 5000
callback: benchmarks/api/fabric/lib/create-private-asset.js
- label: create-private-asset-10000
description: Test a submitTransaction() Gateway method against the NodeJS `fixed-asset` Smart Contract method named `createPrivateAsset`, which inserts an asset of size 10000 bytes into the Private data store.
chaincodeID: fixed-asset
txDuration: 300
rateControl: { type: fixed-backlog, opts: { unfinished_per_client: 10, startingTps: 1} }
arguments:
chaincodeID: fixed-asset
bytesize: 10000
callback: benchmarks/api/fabric/lib/create-private-asset.js
monitor:
type:
- prometheus
prometheus:
url: "http://localhost:9090"
push_url: "http://localhost:9091"
metrics:
ignore: [prometheus, pushGateway, cadvisor, grafana, node-exporter, ca.org1.example.com, ca.org2.example.com]
include:
Avg Memory (MB):
query: sum(container_memory_rss{name=~".+"}) by (name)
step: 10
label: name
statistic: avg
multiplier: 0.000001
CPU (%):
query: sum(rate(container_cpu_usage_seconds_total{name=~".+"}[1m])) by (name)
step: 10
label: name
statistic: avg
multiplier: 100
Network In (MB):
query: sum(rate(container_network_receive_bytes_total{name=~".+"}[1m])) by (name)
step: 10
label: name
statistic: sum
multiplier: 0.000001
Network Out (MB):
query: sum(rate(container_network_transmit_bytes_total{name=~".+"}[1m])) by (name)
step: 10
label: name
statistic: sum
multiplier: 0.000001
Disc Write (MB):
query: sum(rate(container_fs_writes_bytes_total{name=~".+"}[1m])) by (name)
step: 10
label: name
statistic: sum
multiplier: 0.000001
Disc Read (MB):
query: sum(rate(container_fs_reads_bytes_total{name=~".+"}[1m])) by (name)
step: 10
label: name
statistic: sum
multiplier: 0.000001
observer:
type: prometheus
interval: 10
153 changes: 153 additions & 0 deletions benchmarks/api/fabric/couchDB/contract/get-private-asset.yaml
@@ -0,0 +1,153 @@
---
test:
name: get-private-asset-ramp-couchDB
description: This is a duration based benchmark targeting a Hyperledger Fabric network with a CouchDB world state database using the `fixed-asset` NodeJS chaincode contract that is interacted with via
a Fabric-SDK-Node Gateway. Each test round invokes the 'getPrivateAsset()' API method. Successive rounds create and retrieve assets of larger bytesize.
workers:
type: local
number: 10
rounds:
- label: get-private-asset-evaluate-100
description: Test an evaluateTransaction() Gateway method against the NodeJS `fixed-asset` Smart Contract method named `getPrivateAsset`. This method performs a getState on an item that matches an asset of size 100 bytes.
chaincodeID: fixed-asset
txDuration: 300
rateControl: { type: fixed-backlog, opts: { unfinished_per_client: 50 } }
arguments:
chaincodeID: fixed-asset
create_sizes: [100,200,500,1000,2000,5000,10000]
assets: 1000
bytesize: 100
consensus: false
callback: benchmarks/api/fabric/lib/get-private-asset.js
- label: get-private-asset-evaluate-200
description: Test an evaluateTransaction() Gateway method against the NodeJS `fixed-asset` Smart Contract method named `getPrivateAsset`. This method performs a getState on an item that matches an asset of size 200 bytes.
chaincodeID: fixed-asset
txDuration: 300
rateControl: { type: fixed-backlog, opts: { unfinished_per_client: 50 } }
arguments:
chaincodeID: fixed-asset
nosetup: true
assets: 1000
bytesize: 200
consensus: false
callback: benchmarks/api/fabric/lib/get-private-asset.js
- label: get-private-asset-evaluate-500
description: Test an evaluateTransaction() Gateway method against the NodeJS `fixed-asset` Smart Contract method named `getPrivateAsset`. This method performs a getState on an item that matches an asset of size 500 bytes.
chaincodeID: fixed-asset
txDuration: 300
rateControl: { type: fixed-backlog, opts: { unfinished_per_client: 50 } }
arguments:
chaincodeID: fixed-asset
nosetup: true
bytesize: 500
assets: 1000
consensus: false
callback: benchmarks/api/fabric/lib/get-private-asset.js
- label: get-private-asset-evaluate-1000
description: Test an evaluateTransaction() Gateway method against the NodeJS `fixed-asset` Smart Contract method named `getPrivateAsset`. This method performs a getState on an item that matches an asset of size 1000 bytes.
chaincodeID: fixed-asset
txDuration: 300
rateControl: { type: fixed-backlog, opts: { unfinished_per_client: 50 } }
arguments:
chaincodeID: fixed-asset
nosetup: true
bytesize: 1000
assets: 1000
consensus: false
callback: benchmarks/api/fabric/lib/get-private-asset.js
- label: get-private-asset-evaluate-2000
description: Test an evaluateTransaction() Gateway method against the NodeJS `fixed-asset` Smart Contract method named `getPrivateAsset`. This method performs a getState on an item that matches an asset of size 2000 bytes.
chaincodeID: fixed-asset
txDuration: 300
rateControl: { type: fixed-backlog, opts: { unfinished_per_client: 50 } }
arguments:
chaincodeID: fixed-asset
nosetup: true
bytesize: 2000
assets: 1000
consensus: false
callback: benchmarks/api/fabric/lib/get-private-asset.js
- label: get-private-asset-evaluate-5000
description: Test an evaluateTransaction() Gateway method against the NodeJS `fixed-asset` Smart Contract method named `getPrivateAsset`. This method performs a getState on an item that matches an asset of size 5000 bytes.
chaincodeID: fixed-asset
txDuration: 300
rateControl: { type: fixed-backlog, opts: { unfinished_per_client: 50 } }
arguments:
chaincodeID: fixed-asset
nosetup: true
bytesize: 5000
assets: 1000
consensus: false
callback: benchmarks/api/fabric/lib/get-private-asset.js
- label: get-private-asset-evaluate-10000
description: Test an evaluateTransaction() Gateway method against the NodeJS `fixed-asset` Smart Contract method named `getPrivateAsset`. This method performs a getState on an item that matches an asset of size 10000 bytes.
chaincodeID: fixed-asset
txDuration: 300
rateControl: { type: fixed-backlog, opts: { unfinished_per_client: 50 } }
arguments:
chaincodeID: fixed-asset
nosetup: true
bytesize: 10000
assets: 1000
consensus: false
callback: benchmarks/api/fabric/lib/get-private-asset.js
- label: get-private-asset-evaluate-8000-fixed-tps
description: Test an evaluateTransaction() Gateway method against the NodeJS `fixed-asset` Smart Contract method named `getPrivateAsset`. This method performs a getState on an item that matches an asset of size 8000 bytes at a fixed TPS.
chaincodeID: fixed-asset
txDuration: 300
rateControl: { type: fixed-rate, opts: { tps: 350 }}
arguments:
chaincodeID: fixed-asset
nosetup: true
bytesize: 8000
assets: 1000
consensus: false
callback: benchmarks/api/fabric/lib/get-private-asset.js
monitor:
type:
- prometheus
prometheus:
url: "http://localhost:9090"
push_url: "http://localhost:9091"
metrics:
ignore: [prometheus, pushGateway, cadvisor, grafana, node-exporter, ca.org1.example.com, ca.org2.example.com]
include:
Avg Memory (MB):
query: sum(container_memory_rss{name=~".+"}) by (name)
step: 10
label: name
statistic: avg
multiplier: 0.000001
CPU (%):
query: sum(rate(container_cpu_usage_seconds_total{name=~".+"}[1m])) by (name)
step: 10
label: name
statistic: avg
multiplier: 100
Network In (MB):
query: sum(rate(container_network_receive_bytes_total{name=~".+"}[1m])) by (name)
step: 10
label: name
statistic: sum
multiplier: 0.000001
Network Out (MB):
query: sum(rate(container_network_transmit_bytes_total{name=~".+"}[1m])) by (name)
step: 10
label: name
statistic: sum
multiplier: 0.000001
Disc Write (MB):
query: sum(rate(container_fs_writes_bytes_total{name=~".+"}[1m])) by (name)
step: 10
label: name
statistic: sum
multiplier: 0.000001
Disc Read (MB):
query: sum(rate(container_fs_reads_bytes_total{name=~".+"}[1m])) by (name)
step: 10
label: name
statistic: sum
multiplier: 0.000001
observer:
type: prometheus
interval: 10

0 comments on commit 38a647d

Please sign in to comment.