summaryrefslogtreecommitdiff
path: root/src/bin/benchmark-null.rs
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2020-11-25 08:11:57 +0200
committerLars Wirzenius <liw@liw.fi>2020-11-25 10:37:38 +0200
commitaf2c79d1963c49402d5b47e916ffb6b0210c79d1 (patch)
treeeea17935c844844a6a4ca5620ee5dae4ede6ce14 /src/bin/benchmark-null.rs
parent02684a9c68ffc87d20ba89852fbcba43ed521039 (diff)
downloadobnam2-af2c79d1963c49402d5b47e916ffb6b0210c79d1.tar.gz
feat: add programs to benchmark server chunk storage
Diffstat (limited to 'src/bin/benchmark-null.rs')
-rw-r--r--src/bin/benchmark-null.rs29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/bin/benchmark-null.rs b/src/bin/benchmark-null.rs
new file mode 100644
index 0000000..6df8ca1
--- /dev/null
+++ b/src/bin/benchmark-null.rs
@@ -0,0 +1,29 @@
+use obnam::benchmark::ChunkGenerator;
+use std::path::PathBuf;
+use structopt::StructOpt;
+
+#[derive(Debug, StructOpt)]
+#[structopt(
+ name = "benchmark-index",
+ about = "Benhcmark the store index in memory"
+)]
+struct Opt {
+ // We don't use this, but we accept it for command line
+ // compatibility with other benchmark programs.
+ #[structopt(parse(from_os_str))]
+ chunks: PathBuf,
+
+ #[structopt()]
+ num: u32,
+}
+
+fn main() -> anyhow::Result<()> {
+ pretty_env_logger::init();
+
+ let opt = Opt::from_args();
+ let gen = ChunkGenerator::new(opt.num);
+
+ for (_, _, _, _) in gen {}
+
+ Ok(())
+}