Giter VIP home page Giter VIP logo

perf's Introduction

perf

This repository includes scripts for the performance test of harbor.

If you see performance problems please open an issue in repo: goharbor/harbor

How to run the performance tests

To run performance tests for the target harbor instance, first ensure you have the prerequisites:

Then:

  1. Clone this repostiroy and generate client from swagger
git clone https://github.com/goharbor/perf
cd perf
  1. Prepare user data
export HARBOR_URL=https://admin:[email protected]
export HARBOR_SIZE=small
go run mage.go prepare
  1. Run all tests
export HARBOR_URL=https://admin:[email protected]
export HARBOR_VUS=100
export HARBOR_ITERATIONS=200
go run mage.go

The environment variables and targets

The environment variables in the table are the configurations for the performance testing. Use VAR1=value1 VAR2=value2 go run mage.go target format to apply the variables to the testing

Variable Description Default value
HARBOR_URL The url of the harbor will be tested, its format is https?://username:[email protected]
HARBOR_SIZE The user data size to prepare for the tests small
HARBOR_VUS The number of virtual users for the performance test 500
HARBOR_ITERATIONS The script total iteration limit (among all VUs) for the performance test 1000
K6_ALWAYS_UPDATE Always install the latest xk6-harbor false
K6_QUIET Disable progress updates of the k6 false
K6_CSV_OUTPUT Make k6 output detailed statistics in a CSV format false
K6_JSON_OUTPUT Make k6 output detailed statistics in JSON format false
HARBOR_REPORT Whether generate testing report false

The following table includes the targets.

Target Description Example
prepare Generate user data HARBOR_SIZE=small HARBOR_URL=https://admin:[email protected] go run mage.go prepare
run Execute a specific test HARBOR_URL=https://admin:[email protected] go run mage.go run list-projects
all Execute all tasks HARBOR_URL=https://admin:[email protected] go run mage.go all
list Print all test go run mage.go list

perf's People

Contributors

chlins avatar heww avatar reasonerjt avatar

Watchers

 avatar

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.