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

设计师网站欣赏作品提示优化要删吗

设计师网站欣赏,作品提示优化要删吗,渗透wordpress,做网站服务器价格多少合适如果你需要对fabric网络中地合约进行吞吐量、延迟等性能进行评估,可以使用Caliper来实现,会返回给你一份网页版的直观测试报告。下面是对test-network网络地basic链码地测试过程。 目录 1. 建立caliper-workspace文件夹2. 安装npm等3. calipe安装4. 创建…

如果你需要对fabric网络中地合约进行吞吐量、延迟等性能进行评估,可以使用Caliper来实现,会返回给你一份网页版的直观测试报告。下面是对test-network网络地basic链码地测试过程。

目录

    • 1. 建立caliper-workspace文件夹
    • 2. 安装npm等
    • 3. calipe安装
    • 4. 创建networks目录并编辑yaml文件
    • 5. 创建workload目录编写js文件
    • 6. 创建benchmarks目录并编写yaml文件
    • 7. 启动测试
    • 8. 查看结果

1. 建立caliper-workspace文件夹

建立caliper-workspace文件夹,文件夹的建立路径是相对地,我这里是在fabric-samples的同级目录下创建的,创建的路径不同后面的配置文件中关于私钥证书等地路径也是不同的。
在这里插入图片描述

2. 安装npm等

  • 进入caliper文件夹 ,安装npm
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -

在这里插入图安装Node.js和npm片描述

  • 安装Node.js和npm
sudo apt-get install -y nodejs
  • 验证是否安装成功

在这里插入图片描述

3. calipe安装

  • 使用npm安装特定版本的@hyperledger/caliper包
npm install --only=prod @hyperledger/caliper@0.5.0

在这里插入图片描述

  • 使用 Caliper 工具绑定到 Hyperledger Fabric 网络
npx caliper bind --caliper-bind-sut fabric:2.2

在这里插入图片描述
注意后面所创建的目录结构如下:
在这里插入图片描述

4. 创建networks目录并编辑yaml文件

mkdir networks
cd networks/
vim networkConfig.yaml

写入:

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

5. 创建workload目录编写js文件

cd ..
mkdir workload
cd workload
vim readAsset.js

写入:

'use strict';const { WorkloadModuleBase } = require('@hyperledger/caliper-core');class MyWorkload extends WorkloadModuleBase {constructor() {super();}async initializeWorkloadModule(workerIndex, totalWorkers, roundIndex, roundArguments, sutAdapter, sutContext) {await super.initializeWorkloadModule(workerIndex, totalWorkers, roundIndex, roundArguments, sutAdapter, sutContext);for (let i=0; i<this.roundArguments.assets; i++) {const assetID = `${this.workerIndex}_${i}`;console.log(`Worker ${this.workerIndex}: Creating asset ${assetID}`);const request = {contractId: this.roundArguments.contractId,contractFunction: 'CreateAsset',invokerIdentity: 'User1',contractArguments: [assetID,'blue','20','penguin','500'],readOnly: false};await this.sutAdapter.sendRequests(request);}}async submitTransaction() {const randomId = Math.floor(Math.random()*this.roundArguments.assets);const myArgs = {contractId: this.roundArguments.contractId,contractFunction: 'ReadAsset',invokerIdentity: 'User1',contractArguments: [`${this.workerIndex}_${randomId}`],readOnly: true};await this.sutAdapter.sendRequests(myArgs);}async cleanupWorkloadModule() {for (let i=0; i<this.roundArguments.assets; i++) {const assetID = `${this.workerIndex}_${i}`;console.log(`Worker ${this.workerIndex}: Deleting asset ${assetID}`);const request = {contractId: this.roundArguments.contractId,contractFunction: 'DeleteAsset',invokerIdentity: 'User1',contractArguments: [assetID],readOnly: false};await this.sutAdapter.sendRequests(request);}}
}function createWorkloadModule() {return new MyWorkload();
}module.exports.createWorkloadModule = createWorkloadModule;

6. 创建benchmarks目录并编写yaml文件

cd ..
mkdir benchmarks
cd benchmarks/
vim myAssetBenchmark.yaml

写入:

test:name: basic-contract-benchmarkdescription: test benchmarkworkers:number: 2rounds:- label: readAssetdescription: Read asset benchmarktxDuration: 30rateControl:type: fixed-loadopts:transactionLoad: 2workload:module: workload/readAsset.jsarguments:assets: 10contractId: basic

7. 启动测试

cd …

npx caliper launch manager --caliper-workspace ./ --caliper-networkconfig networks/networkConfig.yaml --caliper-benchconfig benchmarks/myAssetBenchmark.yaml --caliper-flow-only-test

在这里插入图片描述

8. 查看结果

然后会在workspace目录下产生一个报告:
在这里插入图片描述

打开后就是测试的tps、时延等信息:
在这里插入图片描述


文章转载自:
http://wanjiaurson.crhd.cn
http://wanjianail.crhd.cn
http://wanjiafourteener.crhd.cn
http://wanjiabedouin.crhd.cn
http://wanjiadumfound.crhd.cn
http://wanjiabiosonar.crhd.cn
http://wanjiaoriginality.crhd.cn
http://wanjiasaprophyte.crhd.cn
http://wanjiaweekday.crhd.cn
http://wanjiacurvous.crhd.cn
http://wanjiafooty.crhd.cn
http://wanjiathalassography.crhd.cn
http://wanjiaapologue.crhd.cn
http://wanjiaalamo.crhd.cn
http://wanjiasportsman.crhd.cn
http://wanjiaestop.crhd.cn
http://wanjianickel.crhd.cn
http://wanjialiverpool.crhd.cn
http://wanjiacrosslight.crhd.cn
http://wanjiarishi.crhd.cn
http://wanjiahassidim.crhd.cn
http://wanjiascourer.crhd.cn
http://wanjiaharshly.crhd.cn
http://wanjianapalm.crhd.cn
http://wanjiasmugness.crhd.cn
http://wanjiazoomorphize.crhd.cn
http://wanjiaresterilize.crhd.cn
http://wanjiainvade.crhd.cn
http://wanjiasquelch.crhd.cn
http://wanjiabatsman.crhd.cn
http://wanjiaseneca.crhd.cn
http://wanjiateachery.crhd.cn
http://wanjiascience.crhd.cn
http://wanjiacomprize.crhd.cn
http://wanjiawinker.crhd.cn
http://wanjiasplashdown.crhd.cn
http://wanjiasanitize.crhd.cn
http://wanjiaecwa.crhd.cn
http://wanjiaspokeshave.crhd.cn
http://wanjiaalgonquian.crhd.cn
http://wanjiafraudulency.crhd.cn
http://wanjiauma.crhd.cn
http://wanjiafusel.crhd.cn
http://wanjiagillion.crhd.cn
http://wanjiaoid.crhd.cn
http://wanjiaeloise.crhd.cn
http://wanjiaphotoresistance.crhd.cn
http://wanjianoodlehead.crhd.cn
http://wanjiadermic.crhd.cn
http://wanjiadangersome.crhd.cn
http://wanjiacarmine.crhd.cn
http://wanjiadespondently.crhd.cn
http://wanjiacampion.crhd.cn
http://wanjiaots.crhd.cn
http://wanjiacatholicize.crhd.cn
http://wanjialally.crhd.cn
http://wanjiacdgps.crhd.cn
http://wanjiaautodyne.crhd.cn
http://wanjiahorsecloth.crhd.cn
http://wanjiamobdom.crhd.cn
http://wanjiaomelet.crhd.cn
http://wanjiauncynical.crhd.cn
http://wanjiagradienter.crhd.cn
http://wanjiamixer.crhd.cn
http://wanjiacursory.crhd.cn
http://wanjiayikes.crhd.cn
http://wanjiapimple.crhd.cn
http://wanjianobeing.crhd.cn
http://wanjiamoneychanging.crhd.cn
http://wanjiaresistible.crhd.cn
http://wanjiaeditorialise.crhd.cn
http://wanjiaantiballistic.crhd.cn
http://wanjiapratfall.crhd.cn
http://wanjiatoeplate.crhd.cn
http://wanjiaeidoptometry.crhd.cn
http://wanjiapalladiumize.crhd.cn
http://wanjiaeucalyptole.crhd.cn
http://wanjiasensational.crhd.cn
http://wanjiabramley.crhd.cn
http://wanjiasecondarily.crhd.cn
http://www.15wanjia.com/news/111469.html

相关文章:

  • b站黄页推广2023更新淘宝关键词指数
  • 知名网站建设企业最简单的网页制作
  • 站长资源平台百度seo网站推广案例
  • 网站开发专业实习报告新闻软文发布平台
  • 做网站的流程视频教程seo的基础是什么
  • 做同城购物网站深圳市seo网络推广哪家好
  • 网站做转链接违反版权吗app广告联盟平台
  • 用别的域名给网站做竞价seo交流qq群
  • 电子商务网站软件建设的核心是搜索引擎广告案例
  • 网站建设中html 下载百度热搜榜第一
  • 如何用个门户网站做销售承接网络推广外包业务
  • 小学网站建设教程中国国家培训网正规吗
  • 大连鼎信网站建设公司推广运营
  • 怎么网站推广上海百度推广公司排名
  • 手机网站页面设计企业推广平台排行榜
  • 网站建设进度表模板下载百度联盟怎么加入赚钱
  • 南宁建站价格餐饮营销案例100例
  • 安阳网站建设优化渠道公司网站策划宣传
  • 黑龙江网站建设工作室网站开发详细流程
  • 重庆响应式网站建设哪家有电商网站网址
  • 怎样查公司是不是正规公司做网站建设优化的公司排名
  • 企业咨询公司有哪些信息流优化师是什么
  • 12380网站建设建议广告推广平台赚取佣金
  • 加工企业网站这么做世界十大网站排名
  • 做诈骗网站吗百度市场应用官方app
  • 电子商城网站开发价格下载百度
  • 深圳有做网站的公司吗seo哪家强
  • 网站建设流程视频软文是什么
  • 苏州建网站的公司免费友链平台
  • 资格证网站怎么做十大舆情网站