Skip to content

Commit e658294

Browse files
committed
Merge branch 'main' into demo
2 parents 43bd301 + 47ca2fa commit e658294

File tree

7 files changed

+100
-11
lines changed

7 files changed

+100
-11
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,21 @@ Demo - https://www.perfcheck.com/
77

88

99
# How to Use
10+
Headline: Scale Your Load Testing Efforts with Loadtester.
11+
12+
Introduction: Loadtester is a powerful tool that helps you simulate millions of concurrent users by distributing load tests across multiple computers.
13+
14+
Steps:
15+
16+
1. Install Loadtester on your local machine or server.
17+
2. Use the intuitive graphical interface to design your load test scenario.
18+
3. Configure test settings such as the number of virtual users, test duration, and test environment.
19+
4. Distribute the load test across multiple machines or servers using the Loadtester controller.
20+
5. Monitor test results in real-time using built-in reporting and analysis tools.
21+
6. Analyze test results to identify performance bottlenecks and optimize your system for maximum scalability.
22+
23+
Call-to-action: Try Loadtester today and discover how it can help you improve the performance and scalability of your application or website.
24+
1025

1126

1227

ui/index.html

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,52 @@
33
<head>
44
<meta charset="UTF-8" />
55
<link rel="icon" type="image/svg+xml" href="/logo.svg" />
6-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
76
<title>Perfcheck.com</title>
7+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
8+
<meta
9+
name="title"
10+
content="Scale Your Load Testing Efforts with Loadtester"
11+
/>
12+
<meta
13+
name="description"
14+
content="Loadtester is a powerful open source tool that helps you simulate millions of concurrent users by distributing load tests across multiple computers."
15+
/>
16+
<meta
17+
name="keywords"
18+
content="stress testing, load testing, locust, rest, http, https, distributed testing"
19+
/>
20+
<meta name="robots" content="index,follow" />
21+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
22+
<meta name="language" content="English" />
23+
<meta name="revisit-after" content="5 days" />
24+
<meta name="author" content="manoj choudhary" />
25+
<!-- Primary Meta Tags -->
26+
27+
<!-- Open Graph / Facebook -->
28+
<meta property="og:type" content="website" />
29+
<meta property="og:url" content="https://Perfcheck.com/" />
30+
<meta
31+
property="og:title"
32+
content="Scale Your Load Testing Efforts with Loadtester"
33+
/>
34+
<meta
35+
property="og:description"
36+
content="Loadtester is a powerful open source tool that helps you simulate millions of concurrent users by distributing load tests across multiple computers."
37+
/>
38+
<!-- <meta property="og:image" content="https://metatags.io/assets/meta-tags-16a33a6a8531e519cc0936fbba0ad904e52d35f34a46c97a2c9f6f7dd7d336f2.png"> -->
39+
40+
<!-- Twitter -->
41+
<meta property="twitter:card" content="summary_large_image" />
42+
<meta property="twitter:url" content="https://Perfcheck.com/" />
43+
<meta
44+
property="twitter:title"
45+
content="Scale Your Load Testing Efforts with Loadtester"
46+
/>
47+
<meta
48+
property="twitter:description"
49+
content="Loadtester is a powerful open source tool that helps you simulate millions of concurrent users by distributing load tests across multiple computers."
50+
/>
51+
<!-- <meta property="twitter:image" content="https://metatags.io/assets/meta-tags-16a33a6a8531e519cc0936fbba0ad904e52d35f34a46c97a2c9f6f7dd7d336f2.png"> -->
852
</head>
953
<body>
1054
<div id="root"></div>

ui/src/constants/dashboard.const.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export const selectedRequestConst = {
88
requestParams: [{ ...commonRequestHeader }],
99
requestCookies: [{ ...commonRequestHeader }],
1010
requestBody: {},
11+
loading: false,
1112
};
1213
export const newRequestStruct = {
1314
request: undefined,

ui/src/pages/Dashboard/AddEditRequest/selectedRequest.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
Input,
1010
Tooltip,
1111
Spacer,
12+
Spinner,
1213
} from "@chakra-ui/react";
1314
import { useSelector, useDispatch } from "react-redux";
1415
import {
@@ -17,7 +18,10 @@ import {
1718
ArrowDownIcon,
1819
InfoOutlineIcon,
1920
} from "@chakra-ui/icons";
20-
import { getSelectedRequest } from "../../../store/stress/dashboard/selectors";
21+
import {
22+
getSelectedRequest,
23+
getSendRequestLoadingState,
24+
} from "../../../store/stress/dashboard/selectors";
2125
import { RestMethods } from "../../../store/stress/dashboard/types";
2226
import RequestOptions from "./requestOptions";
2327
import {
@@ -47,6 +51,7 @@ function CustomizeToolTipInfo({ text }: { text: string }) {
4751
export default function SelectedAddEditRequest() {
4852
const dispatch = useDispatch();
4953
const selectedRequest = useSelector(getSelectedRequest);
54+
const isLoading = useSelector(getSendRequestLoadingState);
5055

5156
const [method, setMethod] = useState<RestMethods>(
5257
selectedRequest?.method || "GET"
@@ -183,7 +188,7 @@ export default function SelectedAddEditRequest() {
183188
rightIcon={<ArrowForwardIcon />}
184189
onClick={() => sendRequest()}
185190
>
186-
Run
191+
{isLoading ? <Spinner /> : "Run"}
187192
</Button>
188193
<OtherOption />
189194
</InputWrap>

ui/src/store/stress/dashboard/reducer.ts

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ import {
2222
ADD_NEW_REQUEST,
2323
CURL_TO_REQUEST,
2424
PARSE_COOKIE,
25+
SEND_REQUEST_REQUEST,
26+
SEND_REQUEST_SUCCESS,
27+
SEND_REQUEST_FAILURE,
2528
} from "./actionTypes";
2629
import {
2730
IDashboard,
@@ -42,6 +45,7 @@ const initialState: IDashboard = {
4245
data: undefined,
4346
},
4447
selectedRequest: {
48+
loading: false,
4549
...newRequestStruct,
4650
},
4751
};
@@ -62,23 +66,26 @@ const mapRequest = (curlPayload: CurlToJSONPayload) => {
6266
const common: SelectedRequest = { ...selectedRequestConst };
6367
const requestHeader = mapPrams(curlPayload?.header || {});
6468
const requestparams = mapPrams(curlPayload?.params || {});
65-
66-
// const requestCookies = mapPrams(curlPayload?.cookies || {});
67-
6869
const requestBody = curlPayload?.data || {};
69-
70-
// if (Object.keys(requestCookies).length)
71-
// common.requestCookies = requestCookies;
7270
if (Object.keys(requestHeader).length) common.requestHeader = requestHeader;
7371
if (Object.keys(requestparams).length) common.requestParams = requestparams;
7472
if (Object.keys(requestBody).length) common.requestBody = requestBody;
7573
return common;
7674
};
7775

76+
const setRequestSuccessLodingState = (state: typeof initialState) => {
77+
return {
78+
...state,
79+
selectedRequest: {
80+
...state.selectedRequest,
81+
loading: false,
82+
},
83+
};
84+
};
85+
7886
export default (state = initialState, action: DashboardAction) => {
7987
switch (action.type) {
8088
case PARSE_COOKIE: {
81-
console.log("actionpayloadactionpayload", action.payload);
8289
const cookies = mapPrams(action.payload || {});
8390
return {
8491
...state,
@@ -187,7 +194,7 @@ export default (state = initialState, action: DashboardAction) => {
187194
}
188195
case ADD_REQUEST_PARAMS: {
189196
let { requestParams } = state.selectedRequest;
190-
const requestToUpdate = requestParams[action.payload?.position || 0];
197+
const requestToUpdate = requestParams[action.payload?.position ?? 0];
191198
requestToUpdate[action.payload.key] = action.payload.value;
192199
requestToUpdate.isChecked = true;
193200
if (requestParams.length - 1 === action.payload?.position) {
@@ -201,6 +208,19 @@ export default (state = initialState, action: DashboardAction) => {
201208
},
202209
};
203210
}
211+
case SEND_REQUEST_FAILURE:
212+
return setRequestSuccessLodingState(state);
213+
case SEND_REQUEST_SUCCESS:
214+
return setRequestSuccessLodingState(state);
215+
case SEND_REQUEST_REQUEST: {
216+
return {
217+
...state,
218+
selectedRequest: {
219+
...state.selectedRequest,
220+
loading: true,
221+
},
222+
};
223+
}
204224
case SELECT_REQUEST: {
205225
const [url, queryParams] = action.payload.url.split("?");
206226
const parsed = queryString.parse(queryParams) as Record<string, any>;

ui/src/store/stress/dashboard/selectors.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ export const getSelectedRequestId = (state: ApplicationState) => {
1111
export const getSelectedRequest = (state: ApplicationState) => {
1212
return state.dashboard?.selectedRequest?.request;
1313
};
14+
export const getSendRequestLoadingState = (state: ApplicationState) => {
15+
return state.dashboard?.selectedRequest?.loading;
16+
};
1417

1518
export const getSelectedRequestHeaders = (state: ApplicationState) => {
1619
return state.dashboard?.selectedRequest?.requestHeader;

ui/src/store/stress/dashboard/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export interface SelectedRequest {
3939
requestParams: RequestHeadersAndParamsPayload[];
4040
requestBody: Record<string, any>[] | Object;
4141
response?: RequestResponse;
42+
loading: boolean;
4243
}
4344
export interface IDashboard {
4445
history: {

0 commit comments

Comments
 (0)