Skip to content

Commit 68a67d5

Browse files
committed
modify stress test
1 parent fd77020 commit 68a67d5

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

stress/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,7 @@ num-format = "0.4.4"
5353
sysinfo = { version = "0.32", optional = true }
5454
libc = "=0.2.164" # https://github.com/GuillaumeGomez/sysinfo/issues/1392
5555
async-trait = "0.1.51"
56+
futures-executor = { workspace = true }
57+
5658
[features]
5759
stats = ["sysinfo"]

stress/src/logs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
~31 M/sec
77
88
Hardware: AMD EPYC 7763 64-Core Processor - 2.44 GHz, 16vCPUs,
9-
~44 M /sec
9+
~40 M /sec
1010
*/
1111

1212
use opentelemetry::InstrumentationScope;
@@ -37,7 +37,7 @@ pub struct NoOpLogProcessor {
3737
impl LogProcessor for NoOpLogProcessor {
3838
fn emit(&self, record: &mut opentelemetry_sdk::logs::LogRecord, scope: &InstrumentationScope) {
3939
let log_tuple = &[(record as &LogRecord, scope)];
40-
let _ = self.exporter.export(LogBatch::new(log_tuple));
40+
let _ = futures_executor::block_on(self.exporter.export(LogBatch::new(log_tuple)));
4141
}
4242

4343
fn force_flush(&self) -> opentelemetry_sdk::logs::LogResult<()> {

0 commit comments

Comments
 (0)