GithubHelp home page GithubHelp logo

samyuan1990 / probe Goto Github PK

View Code? Open in Web Editor NEW
36.0 4.0 12.0 3.47 MB

Probe is a web GUI application with for Hyperledger Fabric maintainer, user, research to find the best block config logic for specific chain-code.

License: Apache License 2.0

JavaScript 90.67% CSS 0.14% HTML 8.63% Shell 0.08% Dockerfile 0.37% Open Policy Agent 0.11%
performance-analysis ui tool hyperledger-fabric performance-visualization performance tps fabric

probe's Introduction

Probe

Build Status

Issues

GitHub pull requests

中文

What is Probe

Probe

According to blockchain-performance-metrics, Probe is a web GUI application for Hyperledger Fabric mantianer, user, research. Recently, aims at providing a way to control both SUT and LGC to find the best block config logic for specific chaincode for specific fabric network. Meanwhile has a better understanding of how block config impacts performance.

  • Probe provides loop test control for given block parameter arrays.
  • Probe provides TPS result review via GUI.
  • Probe provides sample chaincode for some test cases.

Long term goal for Probe is a coordinator between Test Harness or LGC, SUT.

  • Probe will allow you design shell scripts to schedule SUT and Test Harness.
  • Probe will allow you investigate performance matrix with GUI in customer way.

You can use Probe to ...HowToConfigFabricParameters


Sample run of Probe


Table Of Content


Prerequisites

  1. Install this project npm install
  2. Install fabric-sample environment curl -vsS https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh | bash Note If the above curl command fails, it may be that the old version of curl cannot handle redirection or cannot be redirected due to network reasons in

some countries and regions. At this time, users can download the bootstrap.sh script then run it.

  1. Get tape docker pull ghcr.io/hyperledger-twgc/tape
  2. Apply the bridge file to adjust block parameters for test network cp sample/prepareConfig.sh fabric-samples/test-network
  3. npm start

Quick_Start

  1. Access localhost:3000, click TestNetworkSample
  2. Clicksubmit
  3. Access localhost:3000/result/BatchTimeout to see TPS relationship with BatchTimeout
  4. Access localhost:3000/result/MaxMessageCount to see TPS relationship with MaxMessageCount

Docker

If you want to try with docker usage, welcome to use docker run -d --rm --name Probe -p 3000:3000 -v /var/run/docker.sock:/var/run/docker.sock -v $(pwd):/home/probe \ 19902439/probe:latest it is based on alphine, and which means, you may need to make sure your minifab/fabric sample works instead, as install for configtxgen or able to use docker in docker.


Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -s)
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

If your want to contribute Probe with new feature, bug fixing please create a new issue, of course with PR is best. Also welcome for documentatoin, learning course, etc. For development, please complete Quick start above. For Frontend, please use npm run build. For backend, please develop --DryRun as mock for unit test and adding real cases in CI


License

Hyperledger Project source code files are made available under the Apache License, Version 2.0 (Apache-2.0), located in the LICENSE file.


Contact


Why Probe

As discussed with TWGC performance work group, we found out that different block parameters, networks, chaincode language and chaincode logic having influence final TPS.

To answer, the best parameter for specific fabric network and fabric chaincode, this project been created.

Probe is not

  • Real time time monitor, for real time tps monitor, pls use Prometheus. (But Probe has demo for it with test network here)
  • Auto test framework for Fabric performance, as in probe, we will invoke as byfn or minifab for your network up/down/cleanup.
  • Performance test tool for Fabric, for this we using tape.
  • GUI for tape, tape focus on once off time performance testing.

THANKS FOR CHOOSING

probe's People

Contributors

dependabot[bot] avatar lyp830414 avatar samyuan1990 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

probe's Issues

Grafana version problem

When I run docker-compose up -d to start grafana container, the following error comes

GF_PATHS_DATA='/var/lib/grafana' is not writable.
You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migration-from-a-previous-version-of-the-docker-container-to-5-1-or-later
mkdir: can't create directory '/var/lib/grafana/plugins': Permission denied

I find that it may be caused by the version of grafana and grafana:5.0.0 can solve this problem(Prometheus-部署Grafana).
So I change grafana image version in monitor/docker-compose.yaml

grafana:
container_name: grafana
# image: grafana/grafana
image: grafana/grafana:5.0.0
ports:
- "3001:3000"
volumes:
- ./prometheus/grafana/grafana:/var/lib/grafana
- ./prometheus/grafana/conf:/usr/share/grafana/conf
networks:
- monitor

And I can visit http://localhost:3001/ for grafana with admin/admin now.
If you have better solution, pls tell me.

连接错误

peer0.org2.example.com:9051: failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup peer0.org2.example.com on 183.60.83.19:53: no such host"

npm server support

scenario: start npm server for Probe
if: we start a server
when: some one want to start Probe to input data for loop testing
then: he/she can use the web ui

Is "tx size" from the document always be `fixed size` ?

  • If the transations are from different chaincode's method:
    i.e, one tx aims to set a value (Key xxx: Value(int)), that maybe a short size of the transaction
    another tx aims to store huge data(Key: xxx, value (big-array-bytes)), that maybe a size gap to the tx size according to previous one ?

  • Then , from the document:
    I learnt that the block_size can be caculated by block size = min(PreferredMaxBytes,MaxMessageCount * tx size, AbsoluteMaxBytes), but ... if the tx size differs from each transaction, will the result maybe not such precise? (Or, tape use a unique chaincode method for testing, so tx should be always fixed size. )
    (For tx size understanding, I‘m not sure whether it should be a tape's question :-) )
    @SamYuan1990

web ui support

scenario: when some one open the web
if:
when: he want to see result
then: a gui page should open

scenario: when some one open the web
if:
when: he want to start test
then: a config page should open

Could not get script via 'curl -vsS https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh | bash'

Issue description
As curl could not support https( unless user try to manually compile and install curl code with enable 'https' feature )

Then it failed after I tried ‘ curl -vsS https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh | bash’, shown as following figure.

image

I haven't found a good way about how to download the script automatically, so I did it by manual :-)

Proposal
Shall we notice user to do it by manual in README? Or any approach the way to download & operate it .

execute cli support

scenario: when some one input cli for start/down fabric network
if:
when: click start
then: cli should be executed

azp release

release document.
mutil plate form supports.

decouple api and ui

scenario: when development
if: we decouple api and ui
when: some changes happen
then: just change ui or api as decoupled

Problem occurs when test probe under Centos 7.X

Something wrong when I test the probe.
1. As I obey the steps from REAME, npm install and ./bootstrap.sh, then copy the configuration sh -> test-network.
2. Visit the web with myIP:3000, then I choose the 'TestNetwork Sample' , and do "Submit" at the end of web.
3. I found the chain could not bring up in backend (no docker container), and the npm report issues in my attachment.

My testbed:
- Linux CentOS7-135 3.10.0-1160.6.1.el7.x86_64

(More test notes I have remarked them at fabric-performance-wiki/issues/14)

liyiping-probe-issue-log.txt
@SamYuan1990

tape retry 3 times if fail

tape start
{
status: 1,
signal: null,
output: [
null,
,
<Buffer 74 69 6d 65 3d 22 32 30 32 30 2d 31 32 2d 30 35 54 31 35 3a 30 36 3a 35 35 5a 22 20 6c 65 76 65 6c 3d 69 6e 66 6f 20 6d 73 67 3d 22 53 74 61 72 74 20 ... 164 more bytes>
],
pid: 50585,
stdout: ,
stderr: <Buffer 74 69 6d 65 3d 22 32 30 32 30 2d 31 32 2d 30 35 54 31 35 3a 30 36 3a 35 35 5a 22 20 6c 65 76 65 6c 3d 69 6e 66 6f 20 6d 73 67 3d 22 53 74 61 72 74 20 ... 164 more bytes>
}
time="2020-12-05T15:06:55Z" level=info msg="Start sending transactions."
time="2020-12-05T15:07:00Z" level=error msg="error connecting to l

Data collection

  1. Fixed cpu and memory limitation for test-network.(running via single click)

A loop for batchtimeout , x, y, z...
All data configured and prepared by Probe

  1. An easy way to run and make volunteer able to contribute data. (via a sample pr)
  2. English and Chinese video on bilibli and call for data contribution.
    Chinese version for TWGC
    English version for global...

For next when we have data sample, we are able to do some AI/analysis. To answer what's the best configuration for fabric?
image

UI enhancement

home page,(show status and link to pages below)
start page, (show the command will run as....)
result page,(show result)

the batch size preferred max bytes (512000) greater than the absolute max bytes (500)

Describe the bug
我把BatchTimeout设置为2s,MaxMessageCount=128000,AbsoluteMaxBytes=500,PreferredMaxBytes=512000,然后启动测试网络时,会提示以下错误。

Failed validating bootstrap block: initializing channelconfig failed: could not create channel Orderer sub-group config: Attempted to set the batch size preferred max bytes (512000) greater than the absolute max bytes (500).

An error occurred after the project was run again.

After I cloned the project and ran it on my ubuntu20.04 system, I checked the log and the whole project was finished. However, the data of TPS Relationship with BatchTimeout and TPS relationship with MaxMessageCount cannot be seen. And errors have occurred. The result is as follows: Have you met this kind of mistake, please help me.
1
微信图片_20220319143833
微信图片_20220319143842

TypeError: Cannot read property 'name' of undefined

root@famebamboo:/home/go/src/Probe-1.0.1# npm start

[email protected] start /home/go/src/Probe-1.0.1
node ./bin/www

/home/go/src/Probe-1.0.1/node_modules/universalify/index.js:15
}, 'name', { value: fn.name })
^

TypeError: Cannot read property 'name' of undefined
at exports.fromCallback (/home/go/src/Probe-1.0.1/node_modules/universalify/index.js:15:26)
at Object. (/home/go/src/Probe-1.0.1/node_modules/fs-extra/lib/fs/index.js:57:27)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object. (/home/go/src/Probe-1.0.1/node_modules/fs-extra/lib/index.js:5:6)

https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh cannot be reached.

As I access the https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh, the web cannot be reached now (I've tried to ping "raw.githubusercontent.com" then fail, both under Win7 & Ubuntu 18) .

image

Does the script's url need to be changed to that of the fabric project shown as following in the read me document?
https://github.com/hyperledger/fabric/blob/master/scripts/bootstrap.sh

fix up needed

const url = '/api/run?Path=.%2Ffabric-samples%2Ftest-network%2F&BatchTimeout=0.125%2C0.25%2C0.5%2C1%2C2%2C4%2C8&MaxMessageCount=50000&AbsoluteMaxBytes=20&PreferredMaxBytes=20480&CoolDown=5&PrepareCLI=.%2FprepareConfig.sh&StartCLI=.%2Fnetwork.sh&CCDeployCLI=.%2Fnetwork.sh&TapeCount=10000&ShutDownCLI=.%2Fnetwork.sh';

parameter supports

scenario: when someone start with parameter input
if:
when: click start
then: the parameters should used in loop

azp pipeline support

scenario: for development
if: we have pipeline
when: when some developer commits pr
then: the code can be tested by ci

rs.csv文件无法添加新数据

您好!我在根据您在README中给出的步骤进行尝试的时候发现logger.log日志中有这样的报错,并且结果无法写入到data/rs.csv文件中,请问这个问题您这边能不能提供一些解决思路呢?

[2021-01-02T10:01:27.356] [INFO] app - {
Path: './fabric-samples/test-network',
BatchTimeout: '1,2',
MaxMessageCount: '10',
AbsoluteMaxBytes: '2',
PreferredMaxBytes: '4',
CoolDown: '5',
PrepareCLI: './prepareConfig.sh',
StartCLI: './network.sh',
CCDeployCLI: './network.sh',
TapeCount: '500',
ShutDownCLI: './network.sh'
}
[2021-01-02T10:01:27.359] [INFO] app - process start
[2021-01-02T10:01:27.360] [INFO] app - prepare genesis block config {"Chaincode":"sample","BatchTimeout":1,"MaxMessageCount":10,"AbsoluteMaxBytes":2,"PreferredMaxBytes":4}
[2021-01-02T10:01:27.388] [INFO] app - network up
[2021-01-02T10:01:50.353] [INFO] app - deployCC
[2021-01-02T10:01:50.472] [ERROR] app - {
status: 1,
signal: null,
output: [
null,
<Buffer 1b 5b 30 3b 33 34 6d 64 65 70 6c 6f 79 69 6e 67 20 63 68 61 69 6e 63 6f 64 65 20 6f 6e 20 63 68 61 6e 6e 65 6c 20 27 6d 79 63 68 61 6e 6e 65 6c 27 1b ... 999 more bytes>,
<Buffer 73 63 72 69 70 74 73 2f 64 65 70 6c 6f 79 43 43 2e 73 68 3a 20 6c 69 6e 65 20 35 39 3a 20 67 6f 3a 20 63 6f 6d 6d 61 6e 64 20 6e 6f 74 20 66 6f 75 6e ... 135 more bytes>
],
pid: 170948,
stdout: <Buffer 1b 5b 30 3b 33 34 6d 64 65 70 6c 6f 79 69 6e 67 20 63 68 61 69 6e 63 6f 64 65 20 6f 6e 20 63 68 61 6e 6e 65 6c 20 27 6d 79 63 68 61 6e 6e 65 6c 27 1b ... 999 more bytes>,
stderr: <Buffer 73 63 72 69 70 74 73 2f 64 65 70 6c 6f 79 43 43 2e 73 68 3a 20 6c 69 6e 65 20 35 39 3a 20 67 6f 3a 20 63 6f 6d 6d 61 6e 64 20 6e 6f 74 20 66 6f 75 6e ... 135 more bytes>
}
[2021-01-02T10:01:50.474] [INFO] app - cool down
[2021-01-02T10:01:55.478] [INFO] app - tape start
[2021-01-02T10:03:20.178] [ERROR] app - {
status: 1,
signal: null,
output: [
null,
,
<Buffer 74 69 6d 65 3d 22 32 30 32 31 2d 30 31 2d 30 32 54 30 32 3a 30 31 3a 35 38 5a 22 20 6c 65 76 65 6c 3d 69 6e 66 6f 20 6d 73 67 3d 22 53 74 61 72 74 20 ... 254988 more bytes>
],
pid: 170981,
stdout: ,
stderr: <Buffer 74 69 6d 65 3d 22 32 30 32 31 2d 30 31 2d 30 32 54 30 32 3a 30 31 3a 35 38 5a 22 20 6c 65 76 65 6c 3d 69 6e 66 6f 20 6d 73 67 3d 22 53 74 61 72 74 20 ... 254988 more bytes>
}
[2021-01-02T10:03:20.179] [ERROR] app - error in tps testing
[2021-01-02T10:03:20.179] [INFO] app - tape down
[2021-01-02T10:03:20.259] [INFO] app - network down
[2021-01-02T10:03:27.597] [INFO] app - cool down
...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.