Skip to content

Commit 83c7f7a

Browse files
committed
[doc] minor cleanup
1 parent dc393b3 commit 83c7f7a

File tree

2 files changed

+27
-46
lines changed

2 files changed

+27
-46
lines changed

README.md

Lines changed: 13 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ A completed documentation is available at [SerpApi](https://serpapi.com).
1010

1111
To install in your rust application, update Cargo.toml
1212
```sh
13-
serpapi="1.0.0"
13+
serpapi="1.1.0"
1414
```
1515

1616
## Usage
@@ -154,50 +154,16 @@ It returns your account information.
154154
- Asyncronous HTTP request handle method using tokio and reqwest
155155
- Async tests using Tokio
156156

157-
## Benchmarks
158-
159-
Performance benchmarks are available to measure runtime, memory usage, and CPU performance of search queries.
160-
161-
### Running Benchmarks
162-
163-
```bash
164-
export SERPAPI_KEY=your_api_key_here
165-
cargo bench --bench search_query
166-
```
167-
168-
### Benchmark Results
169-
170-
The benchmark executes the same search query ("coffee" in Austin, TX) 10 times and measures runtime, memory usage, and JSON parsing performance.
171-
172-
#### Search Query Performance
173-
174-
| Metric | Time (mean) | Time (std dev) | Iterations |
175-
|--------|-------------|----------------|------------|
176-
| search_with_parsing | 263.01 ms | 5.61 ms | 10 |
177-
178-
*Detailed results available in `target/criterion/search_query/search_with_parsing/`*
179-
180-
**Latest benchmark results:**
181-
182-
**Runtime Performance:**
183-
- **Mean time:** 263.01 ms
184-
- **Standard deviation:** 5.61 ms
185-
- **95% Confidence interval:** 257.92 ms - 269.14 ms
186-
- **Samples collected:** 10
187-
188-
**Memory Usage:**
189-
- **Memory Delta (mean):** 16.98 KB (0.02 MB)
190-
- **Memory Delta (std dev):** 264.29 KB (0.26 MB)
191-
- **Peak Memory:** 16.05 MB
192-
- **Memory samples:** 455
193-
194-
> **Note:** Benchmark results are generated using [Criterion.rs](https://github.com/bheisler/criterion.rs).
195-
> Open `target/criterion/search_query/search_with_parsing/report/index.html` in your browser to view detailed HTML reports with statistical analysis, plots, and comparisons.
196-
>
197-
> The benchmark measures:
198-
> - Runtime performance of the search API call
199-
> - Memory usage during search operations
200-
> - CPU performance of JSON parsing and data access
157+
### Changes log
158+
- 1.1.0: Always reuse the same client object instead of creating a new one for each search.
159+
- This is a breaking change for the API because the client must be unwrapped in the main function.
160+
```rust
161+
# now: 1.1
162+
let client = Client::new(default).unwrap();
163+
# old: 1.0
164+
let client = Client::new(default);
165+
```
166+
- 1.0.0: Initial release
201167

202168
### References
203169
* https://www.lpalmieri.com/posts/how-to-write-a-rest-client-in-rust-with-reqwest-and-wiremock/
@@ -225,6 +191,8 @@ The keyword google can be replaced by any supported search engine:
225191
- apple_app_store
226192
- naver
227193

194+
More example to come to match all search engines supported by [SerpApi.com.](https://serpapi.com/search-engine-apis)
195+
228196
### Search bing
229197
```rust
230198
let mut default = HashMap::new();

README.md.erb

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ A completed documentation is available at [SerpApi](https://serpapi.com).
2525

2626
To install in your rust application, update Cargo.toml
2727
```sh
28-
serpapi="1.0.0"
28+
serpapi="1.1.0"
2929
```
3030

3131
## Usage
@@ -169,6 +169,17 @@ It returns your account information.
169169
- Asyncronous HTTP request handle method using tokio and reqwest
170170
- Async tests using Tokio
171171

172+
### Changes log
173+
- 1.1.0: Always reuse the same client object instead of creating a new one for each search.
174+
- This is a breaking change for the API because the client must be unwrapped in the main function.
175+
```rust
176+
# now: 1.1
177+
let client = Client::new(default).unwrap();
178+
# old: 1.0
179+
let client = Client::new(default);
180+
```
181+
- 1.0.0: Initial release
182+
172183
### References
173184
* https://www.lpalmieri.com/posts/how-to-write-a-rest-client-in-rust-with-reqwest-and-wiremock/
174185
* Serdes JSON
@@ -195,6 +206,8 @@ The keyword google can be replaced by any supported search engine:
195206
- apple_app_store
196207
- naver
197208

209+
More example to come to match all search engines supported by [SerpApi.com.](https://serpapi.com/search-engine-apis)
210+
198211
### Search bing
199212
<%= snippet('rust', 'examples/bing_search.rs') %>
200213
see: [https://serpapi.com/bing-search-api](https://serpapi.com/bing-search-api)

0 commit comments

Comments
 (0)