LCOV - code coverage report
Current view: top level - pageserver/ctl/src - index_part.rs (source / functions) Coverage Total Hit
Test: 3eba1babe267649f8cebefc91c236589db030548.info Lines: 0.0 % 11 0
Test Date: 2024-11-22 12:36:12 Functions: 0.0 % 11 0

            Line data    Source code
       1              : use anyhow::Context;
       2              : use camino::Utf8PathBuf;
       3              : use pageserver::tenant::IndexPart;
       4              : 
       5            0 : #[derive(clap::Subcommand)]
       6              : pub(crate) enum IndexPartCmd {
       7            0 :     Dump { path: Utf8PathBuf },
       8              : }
       9              : 
      10            0 : pub(crate) async fn main(cmd: &IndexPartCmd) -> anyhow::Result<()> {
      11            0 :     match cmd {
      12            0 :         IndexPartCmd::Dump { path } => {
      13            0 :             let bytes = tokio::fs::read(path).await.context("read file")?;
      14            0 :             let des: IndexPart = IndexPart::from_json_bytes(&bytes).context("deserialize")?;
      15            0 :             let output = serde_json::to_string_pretty(&des).context("serialize output")?;
      16            0 :             println!("{output}");
      17            0 :             Ok(())
      18              :         }
      19              :     }
      20            0 : }
        

Generated by: LCOV version 2.1-beta