holochain_metrics 0.0.52-alpha2

Holochain analytics from logs and other metrics


Project Chat

Twitter Follow

License: Apache-2.0

Provides instrumentation to measure, publish, collect, aggregate, and analyze performance metrics from log files or cloudwatch.



Use the with_latency_publishing! macro to wrap existing rust functions with latency calculations. Or more generally just invoke the publisher with your own metrics.

use holochain_metrics::{Metric, LoggerMetricPublisher};

fn main() {

    let publisher = LoggerMetricPublisher::default();
    let metric = Metric:new("request_size", 1000.0);


Command interface

$ hc-metrics --help
metrics 0.0.37-alpha12
Holochain metric utilities

    holochain_metrics <SUBCOMMAND>

    -h, --help       Prints help information
    -V, --version    Prints version information

    cloudwatch-test           Runs a simple smoke test of cloudwatch publishing features
    help                      Prints this message or the help of the given subcommand(s)
    print-cloudwatch-stats    Prints descriptive stats in csv form over a time range from a cloudwatch datasource
    print-log-stats           Prints descriptive stats in csv form over a time range


License: Apache-2.0

Copyright (C) 2019, Holochain Foundation

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at


Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.