Skip to content

Commit ae0bc41

Browse files
authored
Expose run_tests & run_tests (#10)
* Publicly expose Measurement fields * Publicly expose run_tests and PayloadSize::sizes_from_max * bump to version 1.1.1 and upgrade deps
1 parent 1d0d083 commit ae0bc41

File tree

4 files changed

+19
-19
lines changed

4 files changed

+19
-19
lines changed

Cargo.lock

Lines changed: 13 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cfspeedtest"
3-
version = "1.1.0"
3+
version = "1.1.1"
44
edition = "2021"
55
license = "MIT"
66
description = "Unofficial CLI for speed.cloudflare.com"

src/measurements.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ struct StatMeasurement {
1919

2020
#[derive(Serialize)]
2121
pub struct Measurement {
22-
pub(crate) test_type: TestType,
23-
pub(crate) payload_size: usize,
24-
pub(crate) mbit: f64,
22+
pub test_type: TestType,
23+
pub payload_size: usize,
24+
pub mbit: f64,
2525
}
2626

2727
impl Display for Measurement {

src/speedtest.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ impl PayloadSize {
5050
}
5151
}
5252

53-
fn sizes_from_max(max_payload_size: PayloadSize) -> Vec<usize> {
53+
pub fn sizes_from_max(max_payload_size: PayloadSize) -> Vec<usize> {
5454
log::debug!("getting payload iterations for max_payload_size {max_payload_size:?}");
5555
let payload_bytes: Vec<usize> =
5656
vec![100_000, 1_000_000, 10_000_000, 25_000_000, 100_000_000];
@@ -170,7 +170,7 @@ pub fn test_latency(client: &Client) -> f64 {
170170
req_latency
171171
}
172172

173-
fn run_tests(
173+
pub fn run_tests(
174174
client: &Client,
175175
test_fn: fn(&Client, usize, OutputFormat) -> f64,
176176
test_type: TestType,

0 commit comments

Comments
 (0)