summaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2021-03-04 19:02:01 +0100
committerMatthias Beyer <mail@beyermatthias.de>2021-03-10 10:14:47 +0100
commit120a5fa17b4736c953c64bc2ffc6858679608f6b (patch)
tree0730772dd4e0062a5c4847d9c858074d9dfd2245 /src/main.rs
parent60a3fa633a33e315c1439a9f2436fcdb48da62ae (diff)
Add command to get metrics
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index b43a401..35c0ffb 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -184,6 +184,12 @@ async fn main() -> Result<()> {
crate::commands::tree_of(matches, repo, progressbars).await?
}
+ Some(("metrics", _)) => {
+ let repo = load_repo()?;
+ let conn = crate::db::establish_connection(db_connection_config)?;
+ crate::commands::metrics(&repo_path, &config, repo, conn).await?
+ }
+
Some((other, _)) => return Err(anyhow!("Unknown subcommand: {}", other)),
None => return Err(anyhow!("No subcommand")),
}