Skip to content

Commit c3c5c96

Browse files
committed
Merge branch 'main' into demo
2 parents 0e3aa59 + 67982e5 commit c3c5c96

File tree

9 files changed

+494
-21
lines changed

9 files changed

+494
-21
lines changed

.github/workflows/go.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ jobs:
4444
make build && \
4545
mv server/.env.example build/.env
4646
pwd && \
47-
mkdir loadtester-${VERSION}-darwin-amd64 && cp -rf build/darwin/amd64/server build/.env ui/dist loadtester-${VERSION}-darwin-amd64/ && tar cvfz loadtester-${VERSION}-darwin-amd64.tar.gz loadtester-${VERSION}-darwin-amd64 && \
48-
mkdir loadtester-${VERSION}-darwin-arm64 && cp -rf build/darwin/arm64/server build/.env ui/dist loadtester-${VERSION}-darwin-arm64/ && tar cvfz loadtester-${VERSION}-darwin-arm64.tar.gz loadtester-${VERSION}-darwin-arm64 && \
49-
mkdir loadtester-${VERSION}-linux-amd64 && cp -rf build/linux/amd64/server build/.env ui/dist loadtester-${VERSION}-linux-amd64/ && tar cvfz loadtester-${VERSION}-linux-amd64.tar.gz loadtester-${VERSION}-linux-amd64 && \
50-
mkdir loadtester-${VERSION}-linux-arm64 && cp -rf build/linux/arm64/server build/.env ui/dist loadtester-${VERSION}-linux-arm64/ && tar cvfz loadtester-${VERSION}-linux-arm64.tar.gz loadtester-${VERSION}-linux-arm64 && \
51-
mkdir loadtester-${VERSION}-windows-amd64 && cp -rf build/windows/amd64/server.exe build/.env ui/dist loadtester-${VERSION}-windows-amd64/ && tar cvfz loadtester-${VERSION}-windows-amd64.tar.gz loadtester-${VERSION}-windows-amd64
47+
mkdir loadtester-${VERSION}-darwin-amd64 && cp -rf build/darwin/amd64/loadster build/.env loadtester-${VERSION}-darwin-amd64/ && tar cvfz loadtester-${VERSION}-darwin-amd64.tar.gz loadtester-${VERSION}-darwin-amd64 && \
48+
mkdir loadtester-${VERSION}-darwin-arm64 && cp -rf build/darwin/arm64/loadster build/.env loadtester-${VERSION}-darwin-arm64/ && tar cvfz loadtester-${VERSION}-darwin-arm64.tar.gz loadtester-${VERSION}-darwin-arm64 && \
49+
mkdir loadtester-${VERSION}-linux-amd64 && cp -rf build/linux/amd64/loadster build/.env loadtester-${VERSION}-linux-amd64/ && tar cvfz loadtester-${VERSION}-linux-amd64.tar.gz loadtester-${VERSION}-linux-amd64 && \
50+
mkdir loadtester-${VERSION}-linux-arm64 && cp -rf build/linux/arm64/loadster build/.env loadtester-${VERSION}-linux-arm64/ && tar cvfz loadtester-${VERSION}-linux-arm64.tar.gz loadtester-${VERSION}-linux-arm64 && \
51+
mkdir loadtester-${VERSION}-windows-amd64 && cp -rf build/windows/amd64/loadster.exe build/.env loadtester-${VERSION}-windows-amd64/ && tar cvfz loadtester-${VERSION}-windows-amd64.tar.gz loadtester-${VERSION}-windows-amd64
5252
# step 3: Copy build-artifacts in the GitHub release
5353
- name: Copy build-artifacts
5454
uses: skx/github-action-publish-binaries@master

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ clean:
1010
build: ui/build build/server
1111
build/server:
1212
# cd server && go build -ldflags "-w -X main.VERSION=$(VERSION)" -o '../build/server'
13-
cd server && rice embed-go && gox \
13+
cd server && rice embed-go && CGO_ENABLED=0 gox \
1414
-osarch="linux/amd64 linux/arm64 darwin/amd64 darwin/arm64 windows/amd64" \
1515
-ldflags "-w -X main.VERSION=$(VERSION)" \
16-
-output="../build/{{.OS}}/{{.Arch}}/server" \
16+
-output="../build/{{.OS}}/{{.Arch}}/loadster" \
1717
./...
1818
ui/build:
1919
@echo "Building UI..."

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
# Load tester (stress testing tool)
21

3-
4-
5-
Demo - https://www.perfcheck.com/
2+
<div align="center">
3+
<h1>
4+
Load tester (stress testing tool)
5+
</h1>
6+
<p>Loadtester is a powerful tool that helps you simulate millions of concurrent users by distributing load tests across multiple computers.</p>
7+
</div>
68

7-
9+
<p align="center">
10+
<a target="_blank" href="https://docs.perfcheck.com/">Docs</a> | <a href="https://www.perfcheck.com/">Demo</a>
11+
</p>
812

913
# How to Use
1014
Scale Your Load Testing Efforts with Loadtester.
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
#!/bin/bash
2+
latest_version=$(curl -s https://api.github.com/repos/cirnum/loadtester/releases/latest | grep '"tag_name":' | cut -d'"' -f4)
3+
4+
5+
# Replace these values with your Go binary details
6+
APP_NAME="loadster"
7+
GITHUB_USER="cirnum"
8+
GITHUB_REPO="loadtester"
9+
INSTALL_DIR="/usr/local/bin"
10+
11+
12+
# Detect the OS and architecture
13+
OS=$(uname | tr '[:upper:]' '[:lower:]')
14+
ARCH=$(uname -m)
15+
16+
# Adjust the OS and ARCH values for macOS (darwin) and x86_64
17+
if [[ "$OS" == "darwin" ]]; then
18+
OS="darwin"
19+
elif [[ "$OS" == "linux" ]]; then
20+
OS="linux"
21+
fi
22+
if [[ "$ARCH" == "amd64" ]]; then
23+
ARCH="amd64"
24+
elif [[ "$ARCH" == "arm64" ]]; then
25+
ARCH="arm64"
26+
elif [[ "$ARCH" == "x86_64" ]]; then
27+
ARCH="amd64"
28+
fi
29+
30+
echo "Getting latest build for os: ${OS} and arch: ${ARCH}"
31+
# Create the download URL
32+
URL="https://github.com/${GITHUB_USER}/${GITHUB_REPO}/releases/download/${latest_version}/${GITHUB_REPO}-${latest_version}-${OS}-${ARCH}.tar.gz"
33+
34+
# Define the installation directory
35+
NAMET="loadtester.tar.gz"
36+
RMDIR=${GITHUB_REPO}-${latest_version}-${OS}-${ARCH}
37+
38+
# Step 1: Download the tarball
39+
echo "Step 1 of 4: Downloading $URL..."
40+
response_code=$(curl -sL -o "loadtester.tar.gz" -w "%{http_code}" $URL)
41+
if [ "$response_code" -eq 200 ]; then
42+
echo "GitHub page found!"
43+
else
44+
echo "Seems build not found, you can create issue here: https://github.com/cirnum/loadtester/issues"
45+
exit 1;
46+
fi
47+
48+
curl -sL -o "loadtester.tar.gz" "$URL"
49+
50+
# Step 2: Extract the tarball
51+
echo "Step 2 of 4: Extracting $NAMET..."
52+
tar -xzf $NAMET
53+
54+
# Step 3: Move the extracted files to the "bin" folder
55+
echo "Step 3 of 4: Moving files to $INSTALL_DIR..."
56+
mv "$RMDIR/$APP_NAME" "$INSTALL_DIR"
57+
58+
# Step 4: Cleanup - delete the downloaded tarball and empty folder
59+
echo "Step 4 of 4: Cleaning up..."
60+
rm -r "$NAMET" "$RMDIR"
61+
62+
# Verify installation
63+
if command -v "$APP_NAME" &>/dev/null; then
64+
echo "${APP_NAME} installed successfully!"
65+
else
66+
echo "Failed to install ${APP_NAME}. Please check for errors."
67+
fi

installer/npm/package.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"name": "loadster",
3+
"version": "1.0.2",
4+
"description": "Loadtester allows for the distribution of load tests across numerous computers, making it possible to simulate millions of concurrent users.",
5+
"main": "index.js",
6+
"homepage": "https://github.com/cirnum/loadtester#readme",
7+
"scripts": {
8+
"postinstall": "node postinstall.js install",
9+
"preuninstall": "node postinstall.js uninstall"
10+
},
11+
"goBinary": {
12+
"name": "loadster",
13+
"path": "./bin",
14+
"url": "https://github.com/cirnum/loadtester/releases/download/release-v{{version}}/loadtester-release-v{{version}}-{{platform}}-{{arch}}.tar.gz"
15+
},
16+
"repository": {
17+
"type": "git",
18+
"url": "https://github.com/cirnum/loadtester"
19+
},
20+
"keywords": [
21+
"http",
22+
"benchmarking",
23+
"performance",
24+
"load-testing",
25+
"load-generator",
26+
"performance-testing",
27+
"load-test",
28+
"load-tests",
29+
"loadtester",
30+
"api-testing",
31+
"stress-testing"
32+
],
33+
"author": {
34+
"name": "Manoj Choudhary",
35+
"email": "[email protected]",
36+
"url": "https://manoj-portfolio-coral.vercel.app/"
37+
},
38+
"license": "ISC",
39+
"dependencies": {
40+
"go-npm": "0.1.9"
41+
}
42+
}

0 commit comments

Comments
 (0)