Skip to content

Commit

Permalink
update metriken to replace heatmaps with histograms (#103)
Browse files Browse the repository at this point in the history
Updates metriken to replace heatmaps with histograms. Reduces the runtime performance overhead of metrics.
  • Loading branch information
brayniac authored Oct 17, 2023
1 parent 9ede4a3 commit 9e53a29
Show file tree
Hide file tree
Showing 30 changed files with 394 additions and 341 deletions.
42 changes: 15 additions & 27 deletions Cargo.lock

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

6 changes: 4 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ repository = "https://github.com/pelikan-io/pelikan"
license = "Apache-2.0"

[workspace]
resolver = "2"
members = [
"src/common",
"src/config",
Expand Down Expand Up @@ -55,17 +56,18 @@ httparse = "1.8.0"
libc = "0.2.139"
log = "0.4.17"
memmap2 = "0.5.8"
metriken = "0.2.3"
metriken = "0.3.0"
metrohash = "1.0.6"
mio = "0.8.5"
nom = "7.1.3"
parking_lot = "0.12.1"
phf = "0.11.1"
proc-macro2 = "1.0.50"
quote = "1.0.23"
rand = "0.8.5"
rand_chacha = "0.3.1"
rand_xoshiro = "0.6.0"
ringlog = "0.2.0"
ringlog = "0.3.0"
serde = "1.0.152"
serde_json = "1.0.91"
signal-hook = "0.3.15"
Expand Down
9 changes: 6 additions & 3 deletions src/common/src/ssl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
pub use boring::ssl::*;

use net::TlsTcpAcceptor;
use std::io::{Error, ErrorKind};
use std::io::{Error as IoError, ErrorKind as IoErrorKind};

pub trait TlsConfig {
fn certificate_chain(&self) -> Option<String>;
Expand All @@ -21,14 +21,17 @@ pub trait TlsConfig {
/// there were any issues during initialization. Otherwise, returns a
/// `TlsTcpAcceptor` wrapped in an option, where the `None` variant indicates
/// that TLS should not be used.
pub fn tls_acceptor(config: &dyn TlsConfig) -> Result<Option<TlsTcpAcceptor>, std::io::Error> {
pub fn tls_acceptor(config: &dyn TlsConfig) -> Result<Option<TlsTcpAcceptor>, IoError> {
let mut builder = TlsTcpAcceptor::mozilla_intermediate_v5()?;

// we use xor here to check if we have an under-specified tls configuration
if config.private_key().is_some()
^ (config.certificate_chain().is_some() || config.certificate().is_some())
{
return Err(Error::new(ErrorKind::Other, "incomplete tls configuration"));
return Err(IoError::new(
IoErrorKind::Other,
"incomplete tls configuration",
));
}

// load the private key
Expand Down
1 change: 1 addition & 0 deletions src/core/admin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ libc = { workspace = true }
logger = { path = "../../logger" }
metriken = { workspace = true }
net = { path = "../../net" }
parking_lot = { workspace = true }
protocol-admin = { path = "../../protocol/admin" }
protocol-common = { path = "../../protocol/common" }
session = { path = "../../session" }
Expand Down
Loading

0 comments on commit 9e53a29

Please sign in to comment.