Skip to content

Commit 4ee0a0c

Browse files
v1.4.5 (#1686)
1 parent f04255c commit 4ee0a0c

File tree

14 files changed

+494
-107
lines changed

14 files changed

+494
-107
lines changed

Cargo.lock

Lines changed: 79 additions & 79 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
@@ -9,7 +9,7 @@ members = [
99
resolver = "2"
1010

1111
[workspace.package]
12-
version = "1.4.4"
12+
version = "1.4.5"
1313
edition = "2021"
1414
authors = ["Olivier Dehaene"]
1515
homepage = "https://github.com/huggingface/text-generation-inference"

benchmark/src/app.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ fn progress_gauge(title: &str, label: String, progress: f64, color: Color) -> Ga
444444
}
445445

446446
/// Throughput paragraph
447-
fn throughput_paragraph<'a>(throughput: &Vec<f64>, name: &'static str) -> Paragraph<'a> {
447+
fn throughput_paragraph<'a>(throughput: &[f64], name: &'static str) -> Paragraph<'a> {
448448
// Throughput average/high/low texts
449449
let throughput_texts = statis_spans(throughput, "tokens/secs");
450450

@@ -457,7 +457,7 @@ fn throughput_paragraph<'a>(throughput: &Vec<f64>, name: &'static str) -> Paragr
457457
}
458458

459459
/// Latency paragraph
460-
fn latency_paragraph<'a>(latency: &mut Vec<f64>, name: &'static str) -> Paragraph<'a> {
460+
fn latency_paragraph<'a>(latency: &mut [f64], name: &'static str) -> Paragraph<'a> {
461461
// Latency average/high/low texts
462462
let mut latency_texts = statis_spans(latency, "ms");
463463

@@ -483,7 +483,7 @@ fn latency_paragraph<'a>(latency: &mut Vec<f64>, name: &'static str) -> Paragrap
483483
}
484484

485485
/// Average/High/Low spans
486-
fn statis_spans<'a>(data: &Vec<f64>, unit: &'static str) -> Vec<Line<'a>> {
486+
fn statis_spans<'a>(data: &[f64], unit: &'static str) -> Vec<Line<'a>> {
487487
vec![
488488
Line::from(vec![Span::styled(
489489
format!(
@@ -543,7 +543,7 @@ fn latency_histogram<'a>(
543543

544544
/// Latency/Throughput chart
545545
fn latency_throughput_chart<'a>(
546-
latency_throughput: &'a Vec<(f64, f64)>,
546+
latency_throughput: &'a [(f64, f64)],
547547
batch_sizes: &'a [u32],
548548
zoom: bool,
549549
name: &'static str,

benchmark/src/table.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ fn add_throuhgputs(
151151
}
152152
}
153153

154-
fn avg_min_max(data: &Vec<f64>) -> (f64, f64, f64) {
154+
fn avg_min_max(data: &[f64]) -> (f64, f64, f64) {
155155
let average = data.iter().sum::<f64>() / data.len() as f64;
156156
let min = data
157157
.iter()
@@ -164,7 +164,7 @@ fn avg_min_max(data: &Vec<f64>) -> (f64, f64, f64) {
164164
(average, *min, *max)
165165
}
166166

167-
fn px(data: &Vec<f64>, p: u32) -> f64 {
167+
fn px(data: &[f64], p: u32) -> f64 {
168168
let i = (f64::from(p) / 100.0 * data.len() as f64) as usize;
169169
*data.get(i).unwrap_or(&std::f64::NAN)
170170
}

0 commit comments

Comments
 (0)