当前位置: 首页 > news >正文

成都网站建设的定位网站建设延期通知单

成都网站建设的定位,网站建设延期通知单,wordpress改造,重庆旅游攻略详细安排前言:Hyperledger caliper 的本质是使用node对被测试网络进行压力测试,因此需要nodejs。本次使用 Hyperledger caliper 0.5 对 fabric 1.4.6进行压测 准备条件:nodejs 16 (略 linux下 解压环境变量即可) # 创建工作…

前言:Hyperledger  caliper 的本质是使用node对被测试网络进行压力测试,因此需要nodejs。本次使用 Hyperledger caliper 0.5 对 fabric 1.4.6进行压测

准备条件:nodejs 16 (略 linux下 解压+环境变量即可)

# 创建工作目录
mkdir /opt/fabric/caliper
# 进入工作目录
cd /opt/fabric/caliper
# 安装 caliper CLI, (如果慢 可以使用代理  sudo npm config set https-proxy http://172.16.10.34:7890)
npm install --only=prod @hyperledger/caliper-cli@0.5.0 
#绑定fabri
npx caliper bind --caliper-bind-sut fabric:1.4

配置文件(放在工作空间中:/root/fabric/caliper)

network-config.yaml (配置要测试的网络和组织信息)

name: Caliper Benchmarks
version: "2.0.0"caliper:blockchain: fabricchannels:# channelName of mychannel matches the name of the channel created by test network- channelName: channel1# the chaincodeIDs of all the fabric chaincodes in caliper-benchmarkscontracts:- id: ccmaporganizations:- mspid: Org1MSP# Identities come from cryptogen created material for test-networkidentities:certificates:- name: 'Admin'clientPrivateKey:path: '/opt/fabric/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/5ca88db427a2026c0c16fbba1bd17d9e596683f1fa7c8a9b412d88604b63e66d_sk'clientSignedCert:path: '/opt/fabric/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem'connectionProfile:path: 'connection-org1.yaml'discover: true

connection-org1.yaml (配置组织的连接信息)

---
name: first-network-org1
version: 1.0.0
client:organization: Org1connection:timeout:peer:endorser: '300'
organizations:Org1:mspid: Org1MSPpeers:- peer0.org1.example.com
peers:peer0.org1.example.com:url: grpcs://localhost:7051tlsCACerts:path: /opt/fabric/crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pemgrpcOptions:ssl-target-name-override: peer0.org1.example.com

benchmark-config.yaml (配置压力测试的参数)

test:workers:number: 5rounds:- label: Query map.txDuration: 30rateControl:type: fixed-loadopts:transactionLoad: 1000workload:module: workload/query.jsarguments:assets: 2

query.js (在子目录下,绝对路径为:/root/fabric/caliperworkload/query.js) 根据业务编写查询方法或插入方法

'use strict';const { WorkloadModuleBase } = require('@hyperledger/caliper-core');class QueryAssetWorkload extends WorkloadModuleBase {constructor() {super();}async initializeWorkloadModule(workerIndex, totalWorkers, roundIndex, roundArguments, sutAdapter, sutContext) {await super.initializeWorkloadModule(workerIndex, totalWorkers, roundIndex, roundArguments, sutAdapter, sutContext);}async submitTransaction() {await this.sutAdapter.sendRequests({contractId: 'ccmap',  // 你的链码名称contractFunction: 'query', // 查询方法contractArguments: ["a"],readOnly: true});}
} module.exports.createWorkloadModule = () => new QueryAssetWorkload();

执行

 npx caliper launch manager   --caliper-workspace .   --caliper-benchconfig /opt/fabric/caliper/benchmark-config.yaml   --caliper-networkconfig /opt/fabric/caliper/network-config.yaml  --caliper-flow-only-test --caliper-fabric-gateway-enabled

测试效果如下

http://www.yayakq.cn/news/128745/

相关文章:

  • pc建站网站推广培训班
  • 专门做期货的网站优化电池充电什么意思
  • 淮南服装网站建设地址网站培训机构有哪些
  • 如何知道网站是否备案过深圳高端网站制作价格
  • 外贸响应式网站设计百度网站关键词优化在哪里做
  • 专门做二手的网站苏州自学网站建设平台
  • 国网法治建设网站哪个网站做校招
  • 西安网站平面设计可以做网站?
  • 淘宝网站的推广与优化网站建设实训 课程标准
  • app技术电脑优化大师
  • 教研组网站的建设帮别人做网站赚多少钱
  • 花店网站源码学校门户网站建设工作汇报
  • 深圳设计网站排行wordpress标题标签
  • 自贡网站制作装企营销网站建设
  • 企业网站建设存在的不足动漫设计与制作专业学校
  • 安徽住房与城乡建设门户网站简答网站内容建设的时候内链重要性
  • 怎么让网站被搜索到中国企业推广
  • 来个网站四川省建设厅中心网站
  • 中山地区做网站公司快杰云主机
  • 商务网站建设策划书软件开发工具多少钱
  • 饰品企业网站建设国外网页网站设计
  • 做网站的带宽多少钱网站做词
  • 做视频赚钱的国外网站网站建设优秀网
  • 机械加工网站色彩搭配网站制作网站建设案例
  • 住房建设厅网站wordpress简体中文版下载
  • 网站个人博客怎么做建筑图片大全高清
  • 网站编程 外包类型江阴做网站公司
  • 单页营销型网站模板地推推广平台
  • wordpress建两个网站吗网站搜索模块
  • 单页网站技术wordpress无法进入后台