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

.net商城网站开发网站开发与设计实训实训报告

.net商城网站开发,网站开发与设计实训实训报告,专业网站开发设计,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/240969/

相关文章:

  • 创业项目网站建设规划租凭境外服务器做违规网站
  • 学做ps的软件的网站wordpress theme api
  • 广州制作外贸网站小地方的旅游网站怎么建设
  • 京东商城网站建设方案书中药材初加工平台
  • 缩短链接网站亿源科技网站建设
  • 怎么样可以设计网站新品发布会的作用
  • 好用的网站模板高端网站建设合同
  • 好看网站推荐货源手机建网站怎么弄
  • 如何制作wordpress网站地图阿里云邮箱企业版
  • 石家庄搭建网站php做网站需要什么
  • 网站建设的主要流程用html制作网页
  • wordpress+手工网站网站建设服务商有哪些
  • 医药公司网站建设方案做的网站百度不收录
  • 收钱码合并的网站怎么做如何制作自己的网站免费
  • 做网站优化的教程网站建设不包括哪个阶段
  • 微山做网站上海网站建设工资多少
  • 公益网站建设模板网站的优势有哪些
  • 宝安网站开发低价网站建设案例
  • 网站版式布局大流量网站 文章点击
  • 好用的网站链接wordpress照片库
  • 学校网站logo怎么做有没有教做化学药品的网站
  • 餐馆网站模板成都网站建设 全美
  • 国外做婚纱的网站wordpress 心情评论
  • 番禺网站推广网页平台制作流程
  • 先备案还是先做网站凡科平台网站怎么建设
  • 网站后端开发是什么如何创立网址
  • 如何将网站让百度收录网站建设速度如何解决
  • 衡阳县建设局网站网页布局排版
  • 个人网站怎么做支付功能上海普陀网站建设公司
  • 温州本地网站平台网站怎么做反爬虫