Skip to content

Commit

Permalink
Release 0.0.12
Browse files Browse the repository at this point in the history
  • Loading branch information
the2pizza committed Oct 28, 2024
1 parent 52ac2ad commit 4730839
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 22 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pony"
version = "0.0.9"
version = "0.0.12"
edition = "2021"

[dependencies]
Expand Down
17 changes: 0 additions & 17 deletions pony.service

This file was deleted.

3 changes: 1 addition & 2 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ NEW_VERSION="$1"
CARGO_TOML_PATH="Cargo.toml"

echo "Updating version in $CARGO_TOML_PATH to $NEW_VERSION..."
sed -i 's|^version = \".*\"|version = \"$NEW_VERSION\"|' "$CARGO_TOML_PATH"
CARGO_TOML_PATH="Cargo.toml" NEW_VERSION=0.0.10 sed "s|^version = \".*\"|version = \"$NEW_VERSION\"|" $CARGO_TOML_PATH

sed 's|^version = \".*\"|version = \"$NEW_VERSION\"|' Cargo.toml

if [ $? -ne 0 ]; then
echo "Failed to update version in $CARGO_TOML_PATH"
Expand Down
4 changes: 3 additions & 1 deletion src/web.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ pub async fn status(req: Path<Params>, ch_client: Data<Arc<Client>>) -> impl Res
};

for (metric, value) in metrics_value_bps {
if let Some(stripped_metric) = metric.strip_prefix("dev.") {
if let Some(stripped_metric) = metric.strip_prefix(format!("{}.", req.cluster).as_str()) {
let parts: Vec<&str> = stripped_metric.split(".").collect();
let key = format!("bps.{}.{}.{}", parts[0], parts[2], parts[3]);
metrics_map_result.insert(key, value);
Expand All @@ -79,6 +79,8 @@ pub async fn status(req: Path<Params>, ch_client: Data<Arc<Client>>) -> impl Res
metrics_map_result.insert(format!("connections.{}.total", prefix), sum);
}

debug!("Metrics Result {:?}", metrics_map_result);

HttpResponse::Ok().json(metrics_map_result)
}

Expand Down

0 comments on commit 4730839

Please sign in to comment.