You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+38-35Lines changed: 38 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,8 @@
1
1
# BenchPress
2
2
3
-
**BenchPress** is a WordPress plugin for benchmarking PHP code snippets, WordPress queries, and other critical operations. It's designed to help developers evaluate and optimize code performance by running benchmarks and capturing snapshots for comparison.
3
+
**BenchPress** is a WordPress® plugin for benchmarking PHP code snippets, WordPress® queries, and other critical operations.
4
+
5
+
It's designed to help developers evaluate and optimize code performance by running benchmarks and capturing snapshots for later comparison.
4
6
* * *
5
7
6
8
## Table of Contents
@@ -19,17 +21,17 @@
19
21
## Installation
20
22
21
23
1.**Download** the plugin ZIP from the [GitHub repository](https://github.com/robertdevore/benchpress).
22
-
2.**Upload** it via WordPress Admin:
24
+
2.**Upload** it via WordPress® Admin:
23
25
- Go to `Plugins` > `Add New`.
24
26
- Click `Upload Plugin`, select the downloaded ZIP, and click `Install Now`.
25
-
3.**Activate** the plugin via the `Plugins` page in the WordPress Admin.
27
+
3.**Activate** the plugin via the `Plugins` page in the WordPress® Admin.
26
28
* * *
27
29
28
30
## Setup
29
31
30
32
BenchPress automatically creates a custom database table to store snapshots of benchmark results on activation. The plugin also includes settings to customize benchmark runs. To configure these:
31
33
32
-
1. Go to `BenchPress > Settings` in your WordPress admin sidebar.
34
+
1. Go to `BenchPress > Settings` in your WordPress® admin sidebar.
33
35
2. Adjust loop counts, post IDs, and other options to customize how each benchmark runs.
34
36
35
37
* * *
@@ -40,7 +42,7 @@ Once installed and configured, you can run benchmarks, view results, and save sn
40
42
41
43
1.**Running Benchmarks**:
42
44
43
-
- Navigate to `BenchPress` in your WordPress admin menu.
45
+
- Navigate to `BenchPress` in your WordPress® admin menu.
44
46
- Click `Refresh Tests` to run all enabled benchmarks and view results.
45
47
2.**Saving Snapshots**:
46
48
@@ -67,42 +69,43 @@ BenchPress comes with several built-in benchmarks. Here's a quick overview:
67
69
### Adding Custom Benchmarks
68
70
69
71
BenchPress includes a `benchpress_run_all_benchmarks` filter to allow you to add custom benchmarks. Here's an example of how to add your own benchmark:
'description' => sprintf( esc_html__( 'Executed a loop of %d iterations.', 'benchpress' ), $loop_count ),
95
+
];
96
+
}
97
+
```
95
98
96
99
### Removing Benchmarks
97
100
98
101
If you want to remove a specific benchmark, you can use the same `benchpress_run_all_benchmarks` filter. For example, to remove the "Switch vs Match" benchmark:
0 commit comments