Skip to content

Commit

Permalink
improving smoothing to make responses /s cleaner
Browse files Browse the repository at this point in the history
  • Loading branch information
abdelaziz-mahdy committed May 30, 2024
1 parent 1467c63 commit 615fde6
Show file tree
Hide file tree
Showing 24 changed files with 28 additions and 26 deletions.
40 changes: 20 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,69 +55,69 @@ Visual comparisons for database endpoints and static endpoints are provided to s
# Database Endpoints

## Comparison Graph with db endpoints
![Comparison Graph](comparison_graph_db_test.png?v=1717053054)
![Comparison Graph](comparison_graph_db_test.png?v=1717056948)

## Detailed Graphs for each backend
- **go mux db_test**
![go mux db_test Benchmark Graph](backends/go/mux/tests/results/db_test/graph.png?v=1717053054)
![go mux db_test Benchmark Graph](backends/go/mux/tests/results/db_test/graph.png?v=1717056948)

- **c_sharp dot net db_test**
![c_sharp dot net db_test Benchmark Graph](backends/c_sharp/dot-net/tests/results/db_test/graph.png?v=1717053054)
![c_sharp dot net db_test Benchmark Graph](backends/c_sharp/dot-net/tests/results/db_test/graph.png?v=1717056948)

- **python django sync db_test**
![python django sync db_test Benchmark Graph](backends/python/django-sync/tests/results/db_test/graph.png?v=1717053054)
![python django sync db_test Benchmark Graph](backends/python/django-sync/tests/results/db_test/graph.png?v=1717056948)

- **python fast api db_test**
![python fast api db_test Benchmark Graph](backends/python/fast-api/tests/results/db_test/graph.png?v=1717053054)
![python fast api db_test Benchmark Graph](backends/python/fast-api/tests/results/db_test/graph.png?v=1717056948)

- **python django async db_test**
![python django async db_test Benchmark Graph](backends/python/django-async/tests/results/db_test/graph.png?v=1717053054)
![python django async db_test Benchmark Graph](backends/python/django-async/tests/results/db_test/graph.png?v=1717056948)

- **dart server pod db_test**
![dart server pod db_test Benchmark Graph](backends/dart/server-pod/tests/results/db_test/graph.png?v=1717053054)
![dart server pod db_test Benchmark Graph](backends/dart/server-pod/tests/results/db_test/graph.png?v=1717056948)

- **rust actix web db_test**
![rust actix web db_test Benchmark Graph](backends/rust/actix-web/tests/results/db_test/graph.png?v=1717053054)
![rust actix web db_test Benchmark Graph](backends/rust/actix-web/tests/results/db_test/graph.png?v=1717056948)

- **javascript express bun db_test**
![javascript express bun db_test Benchmark Graph](backends/javascript/express-bun/tests/results/db_test/graph.png?v=1717053054)
![javascript express bun db_test Benchmark Graph](backends/javascript/express-bun/tests/results/db_test/graph.png?v=1717056948)

- **javascript express node db_test**
![javascript express node db_test Benchmark Graph](backends/javascript/express-node/tests/results/db_test/graph.png?v=1717053054)
![javascript express node db_test Benchmark Graph](backends/javascript/express-node/tests/results/db_test/graph.png?v=1717056948)



# Static Endpoints

## Comparison Graph with static endpoints
![Comparison Graph](comparison_graph_no_db_test.png?v=1717053054)
![Comparison Graph](comparison_graph_no_db_test.png?v=1717056948)

## Detailed Graphs for each backend
- **go mux no_db_test**
![go mux no_db_test Benchmark Graph](backends/go/mux/tests/results/no_db_test/graph.png?v=1717053054)
![go mux no_db_test Benchmark Graph](backends/go/mux/tests/results/no_db_test/graph.png?v=1717056948)

- **c_sharp dot net no_db_test**
![c_sharp dot net no_db_test Benchmark Graph](backends/c_sharp/dot-net/tests/results/no_db_test/graph.png?v=1717053054)
![c_sharp dot net no_db_test Benchmark Graph](backends/c_sharp/dot-net/tests/results/no_db_test/graph.png?v=1717056948)

- **python django sync no_db_test**
![python django sync no_db_test Benchmark Graph](backends/python/django-sync/tests/results/no_db_test/graph.png?v=1717053054)
![python django sync no_db_test Benchmark Graph](backends/python/django-sync/tests/results/no_db_test/graph.png?v=1717056948)

- **python fast api no_db_test**
![python fast api no_db_test Benchmark Graph](backends/python/fast-api/tests/results/no_db_test/graph.png?v=1717053054)
![python fast api no_db_test Benchmark Graph](backends/python/fast-api/tests/results/no_db_test/graph.png?v=1717056948)

- **python django async no_db_test**
![python django async no_db_test Benchmark Graph](backends/python/django-async/tests/results/no_db_test/graph.png?v=1717053054)
![python django async no_db_test Benchmark Graph](backends/python/django-async/tests/results/no_db_test/graph.png?v=1717056948)

- **dart server pod no_db_test**
![dart server pod no_db_test Benchmark Graph](backends/dart/server-pod/tests/results/no_db_test/graph.png?v=1717053054)
![dart server pod no_db_test Benchmark Graph](backends/dart/server-pod/tests/results/no_db_test/graph.png?v=1717056948)

- **rust actix web no_db_test**
![rust actix web no_db_test Benchmark Graph](backends/rust/actix-web/tests/results/no_db_test/graph.png?v=1717053054)
![rust actix web no_db_test Benchmark Graph](backends/rust/actix-web/tests/results/no_db_test/graph.png?v=1717056948)

- **javascript express bun no_db_test**
![javascript express bun no_db_test Benchmark Graph](backends/javascript/express-bun/tests/results/no_db_test/graph.png?v=1717053054)
![javascript express bun no_db_test Benchmark Graph](backends/javascript/express-bun/tests/results/no_db_test/graph.png?v=1717056948)

- **javascript express node no_db_test**
![javascript express node no_db_test Benchmark Graph](backends/javascript/express-node/tests/results/no_db_test/graph.png?v=1717053054)
![javascript express node no_db_test Benchmark Graph](backends/javascript/express-node/tests/results/no_db_test/graph.png?v=1717056948)


Binary file modified backends/c_sharp/dot-net/tests/results/db_test/graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified backends/c_sharp/dot-net/tests/results/no_db_test/graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified backends/dart/server-pod/tests/results/db_test/graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified backends/dart/server-pod/tests/results/no_db_test/graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified backends/go/mux/tests/results/db_test/graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified backends/go/mux/tests/results/no_db_test/graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified backends/javascript/express-bun/tests/results/db_test/graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified backends/python/django-async/tests/results/db_test/graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified backends/python/django-async/tests/results/no_db_test/graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified backends/python/django-sync/tests/results/db_test/graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified backends/python/django-sync/tests/results/no_db_test/graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified backends/python/fast-api/tests/results/db_test/graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified backends/python/fast-api/tests/results/no_db_test/graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified backends/rust/actix-web/tests/results/db_test/graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified backends/rust/actix-web/tests/results/no_db_test/graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion benchmark-app/public/data.json

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions benchmark-app/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ function App() {
axios.get(`${baseURL}/data.json`, {
cancelToken: source.token,
onDownloadProgress: (progressEvent) => {
const progress = parseInt(Math.round((progressEvent.loaded * 100) / progressEvent.total));
setProgress(progress);
if (progressEvent.total > 0) {
const progress = Math.round((progressEvent.loaded * 100) / progressEvent.total);
setProgress(progress);
}
}
})
.then(response => {
Expand Down
Binary file modified comparison_graph_db_test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified comparison_graph_no_db_test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions scripts/graphs/graph_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ def process_file(file_path):
# Replace infinities with NaN
data['Responses/s'] = data['Responses/s'].replace([np.inf, -np.inf], np.nan)
# Smooth out the values using a rolling mean with a window size of your choice (e.g., 3)
window_size = 3
data['Responses/s'] = data['Responses/s'].rolling(window=window_size, min_periods=1).mean()
window_size = 100
data['Responses/s Smoothed'] = data['Responses/s'].rolling(window=window_size, min_periods=1).mean()

# Remove rows with NaN values (which were infinities)
data = data.dropna(subset=['Responses/s'])
Expand Down Expand Up @@ -100,7 +100,7 @@ def compare_and_plot(all_data, all_summaries,all_cpu,custom_result_file_name=Non
axs[2].plot(data['Timestamp'], data[percentile], label=f'{file_name} - {percentile} Response Time', color=color)

# Responses/s vs. Timestamp
axs[3].plot(data['Timestamp'], data['Responses/s'], label=f'{file_name} - Responses/s', color=color)
axs[3].plot(data['Timestamp'], data['Responses/s'], label=f'{file_name} - Responses/s (Smoothed)', color=color)

# Cumulative Requests and Failures Over Time
# TODO: make it requests and response
Expand Down

0 comments on commit 615fde6

Please sign in to comment.