Skip to content

Commit

Permalink
Merge pull request #28 from reiseburo/alloc-reduction
Browse files Browse the repository at this point in the history
Identify and address some performance hot spots
  • Loading branch information
rtyler authored May 21, 2020
2 parents 6016a1b + 36ce188 commit f6d4b0a
Show file tree
Hide file tree
Showing 9 changed files with 421 additions and 109 deletions.
76 changes: 75 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,6 @@ handlebars = "~3.0.1"

# Needed for time management
chrono = "~0.4.11"

# Needed to tag rules and actions with their own unique identifiers
uuid = { version = "~0.8.1", features = ["v4"] }
11 changes: 11 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,17 @@ For TLS connections, you can use the `openssl` `s_client` command:
echo '<13>1 2020-04-18T15:16:09.956153-07:00 coconut tyler - - [timeQuality tzKnown="1" isSynced="1" syncAccuracy="505061"] hello world' | openssl s_client -connect localhost:6514
----


=== Profiling

Profiling `hotdog` is best done on a Linux host with the `perf` tool, e.g.

[source,bash]
----
RUST_LOG=info perf record --call-graph dwarf -- ./target/debug/hotdog -c ./hotdog.yml
perf report -ng
----

== Similar Projects

`hotdog` was originally motivated by challenges with
Expand Down
3 changes: 2 additions & 1 deletion src/kafka.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ impl Kafka {
Ok(_) => {
timer.stop(handle);
m.counter("kafka.submitted").count(1);
m.counter(&format!("kafka.submitted.{}", &kmsg.topic)).count(1);
m.counter(&format!("kafka.submitted.{}", &kmsg.topic))
.count(1);
}
Err((err, _)) => {
match err {
Expand Down
Loading

0 comments on commit f6d4b0a

Please sign in to comment.