refactor: use system timezone and harden client APIs
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
use criterion::{black_box, criterion_group, criterion_main, Criterion};
|
||||
use tele_tui::utils::formatting::{format_date, format_timestamp_with_tz, get_day};
|
||||
use tele_tui::utils::formatting::{format_date, format_timestamp, get_day};
|
||||
|
||||
fn benchmark_format_timestamp(c: &mut Criterion) {
|
||||
c.bench_function("format_timestamp_50_times", |b| {
|
||||
b.iter(|| {
|
||||
for i in 0..50 {
|
||||
let timestamp = 1640000000 + (i * 60);
|
||||
black_box(format_timestamp_with_tz(timestamp, "+03:00"));
|
||||
black_box(format_timestamp(timestamp));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user