LCOV - code coverage report
Current view: top level - pageserver/ctl/src - index_part.rs (source / functions) Coverage Total Hit
Test: fc67f8dc6087a0b4f4f0bcd74f6e1dc25fab8cf3.info Lines: 0.0 % 11 0
Test Date: 2024-09-24 13:57:57 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_s3_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