Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Lok <[email protected]>
  • Loading branch information
andylokandy committed Jul 3, 2024
1 parent c3c9267 commit 5fdf028
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div align="center">

![minitrace: Extremely fast tracing library for Rust](etc/img/head-img-640.svg)
![minitrace: Extremely fast tracing library for Rust](https://raw.githubusercontent.com/tikv/minitrace-rust/master/etc/img/head-img-640.svg)

[![Crates.io](https://img.shields.io/crates/v/minitrace.svg?style=flat-square&logo=rust)](https://crates.io/crates/minitrace)
[![Documentation](https://img.shields.io/docsrs/minitrace?style=flat-square&logo=rust)](https://docs.rs/minitrace/)
Expand All @@ -13,7 +13,7 @@

minitrace is a tracing library [10~100x faster](#benchmarks) than others:

![benchmark](etc/img/head-benchmark.svg)
![benchmark](https://raw.githubusercontent.com/tikv/minitrace-rust/master/etc/img/head-benchmark.svg)

Features:

Expand Down Expand Up @@ -128,6 +128,7 @@ Feel free to open a PR and add your projects here:
- [Conductor](https://github.com/the-guild-org/conductor): Open-source GraphQL Gateway
- [Apache OpenDAL](https://github.com/apache/opendal): A data access layer for various storage
- [Databend](https://github.com/datafuselabs/databend): Cost-Effective alternative to Snowflake
- [foyer](https://github.com/mrcroxx/foyer): Hybrid in-memory and disk cache in Rust

## FAQ

Expand Down
10 changes: 4 additions & 6 deletions minitrace/src/span.rs
Original file line number Diff line number Diff line change
Expand Up @@ -519,11 +519,9 @@ impl Drop for LocalParentGuard {
let (spans, token) = inner.collector.collect_spans_and_token();
debug_assert!(token.is_some());
if let Some(token) = token {
if !spans.spans.is_empty() {
inner
.collect
.submit_spans(SpanSet::LocalSpansInner(spans), token);
}
inner
.collect
.submit_spans(SpanSet::LocalSpansInner(spans), token);
}
}
}
Expand Down Expand Up @@ -913,7 +911,7 @@ parent5 []
.in_sequence(&mut seq)
.return_const(42_usize);
mock.expect_submit_spans()
.times(4)
.times(5)
.in_sequence(&mut seq)
.withf(|_, collect_token| collect_token.len() == 1 && collect_token[0].collect_id == 42)
.returning({
Expand Down

0 comments on commit 5fdf028

Please sign in to comment.