Skip to content

Commit

Permalink
New Upgrade Version Util (#354)
Browse files Browse the repository at this point in the history
* Saving because I'm testing writing files

* New upgrade program working quite well

* Update license file as well

* Tool seems good to go

* Cargo check is passing, new upgrade-version is ready, old version
removed

* Updating lock file is required for CI to pass

* main.rs clippy lints

* More sensible default

---------

Co-authored-by: Boppy <[email protected]>
  • Loading branch information
jdetter and Boppy authored Oct 3, 2023
1 parent 2daf06c commit 3f5f97f
Show file tree
Hide file tree
Showing 5 changed files with 190 additions and 69 deletions.
11 changes: 11 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ members = [
"crates/sdk/tests/test-counter",
"crates/sdk/tests/test-client",
"crates/sdk/tests/connect_disconnect_client",
"tools/upgrade-version",
]
default-members = ["crates/cli"]
# cargo feature graph resolver. v2 is default in edition2021 but workspace
Expand Down
69 changes: 0 additions & 69 deletions tools/upgrade-version.sh

This file was deleted.

13 changes: 13 additions & 0 deletions tools/upgrade-version/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[package]
name = "upgrade-version"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
walkdir = "2"
tempfile.workspace = true
clap.workspace = true
regex.workspace = true
duct.workspace = true
165 changes: 165 additions & 0 deletions tools/upgrade-version/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
#![allow(clippy::disallowed_macros)]

extern crate clap;
extern crate walkdir;

use clap::{Arg, Command};
use duct::cmd;
use regex::Regex;
use std::env;
use std::ffi::OsStr;
use std::fs;
use std::fs::File;
use std::io::BufRead;
use std::io::BufReader;
use std::io::Write;
use std::path::PathBuf;
use tempfile::NamedTempFile;
use walkdir::WalkDir;

static IGNORE_FILES: [&str; 5] = [
"crates/sdk/tests/connect_disconnect_client/Cargo.toml",
"crates/sdk/tests/test-client/Cargo.toml",
"crates/sdk/tests/test-counter/Cargo.toml",
"crates/sqltest/Cargo.toml",
"crates/testing/Cargo.toml",
];

fn find_files(start_dir: &str, name: &str) -> Vec<String> {
let mut files = Vec::new();
for entry in WalkDir::new(start_dir).into_iter().filter_map(|e| e.ok()) {
if entry.file_type().is_file() && entry.path().file_name() == Some(OsStr::new(name)) {
if IGNORE_FILES.contains(&entry.path().to_string_lossy().as_ref()) {
continue;
}
files.push(entry.path().to_string_lossy().to_string());
}
}
files
}

enum FileProcessState {
Package,
Dependencies,
}

fn process_crate_toml(path: &PathBuf, upgrade_version: &str, upgrade_package_version: bool) {
println!("Processing file: {}", path.to_string_lossy());

let file = File::open(path).unwrap_or_else(|_| panic!("File not found: {}", path.to_string_lossy()));
let reader = BufReader::new(file);
let mut temp_file = NamedTempFile::new().expect("Failed to create temporary file!");
let mut state = FileProcessState::Package;
let re = Regex::new(r#"(version = ")([^"]+)"#).unwrap();

for line_result in reader.lines() {
match line_result {
Ok(line) => {
let new_line = match state {
FileProcessState::Package => {
if line.contains("version = ") && upgrade_package_version {
re.replace(&line, format!("version = \"{}", upgrade_version).as_str())
.into()
} else if line.contains("[dependencies]") {
state = FileProcessState::Dependencies;
line
} else {
line
}
}
FileProcessState::Dependencies => {
if line.starts_with("spacetimedb") {
if !line.contains('{') {
format!("spacetimedb = \"{}\"", upgrade_version)
} else {
// Match the version number and capture it
re.replace(&line, format!("version = \"{}", upgrade_version).as_str())
.into()
}
} else {
line
}
}
};

writeln!(temp_file, "{}", new_line).unwrap();
}
Err(e) => eprintln!("Error reading line: {}", e),
}
}

// Rename the temporary file to replace the original file
fs::rename(temp_file.path(), path).expect("Failed to overwrite source file.");
}

fn process_license_file(upgrade_version: &str) {
let path = "LICENSE.txt";
let file = File::open(path).unwrap_or_else(|_| panic!("File not found: {}", path));
let reader = BufReader::new(file);
let mut temp_file = NamedTempFile::new().expect("Failed to create temporary file!");
let re = Regex::new(r"(^Licensed Work:\s+SpacetimeDB )([\d\.]+)").unwrap();

for line_result in reader.lines() {
match line_result {
Ok(line) => {
let new_line = if line.starts_with("Licensed Work") {
re.replace(
&line,
format!("{}{}", &re.captures(&line).unwrap()[1], upgrade_version).as_str(),
)
.into()
} else {
line
};
writeln!(temp_file, "{}", new_line).unwrap();
}
Err(e) => eprintln!("Error reading line: {}", e),
}
}

// Rename the temporary file to replace the original file
fs::rename(temp_file.path(), path).expect("Failed to overwrite source file.");
}

fn main() {
let matches = Command::new("upgrade-version")
.version("1.0")
.about("Upgrades the version of the SpacetimeDB repository")
.arg(
Arg::new("upgrade_version")
.required(true)
.help("The version to upgrade to"),
)
.arg(
Arg::new("spacetime-path")
.value_parser(clap::value_parser!(PathBuf))
.default_value("../..")
.long("spacetime-path")
.help("The path to SpacetimeDB"),
)
.get_matches();

let version = matches.get_one::<String>("upgrade_version").unwrap();
env::set_current_dir(matches.get_one::<PathBuf>("spacetime-path").unwrap()).ok();

let current_dir = env::current_dir().expect("No current directory!");
let dir_name = current_dir.file_name().expect("No current directory!");
if dir_name != "SpacetimeDB" {
println!("You must execute this binary from inside of the SpacetimeDB directory, or use --spacetime-path");
return;
}

for file in find_files("crates", "Cargo.toml") {
process_crate_toml(&PathBuf::from(file), version, true);
}
for file in find_files("modules", "Cargo.toml") {
process_crate_toml(&PathBuf::from(file), version, false);
}
for file in find_files("crates", "Cargo._toml") {
process_crate_toml(&PathBuf::from(file), version, false);
}

process_crate_toml(&PathBuf::from("crates/testing/Cargo.toml"), version, false);
process_license_file(version);
cmd!("cargo", "check").run().expect("Cargo check failed!");
}

1 comment on commit 3f5f97f

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark for 3f5f97f

Click to view benchmark
Test Base PR %
serialize/location/bsatn/count=100 2.8±0.07µs 33.9 MElem/sec N/A N/A
serialize/location/json/count=100 4.1±0.05µs 23.3 MElem/sec N/A N/A
serialize/location/product_value/count=100 2.8±0.04µs 34.0 MElem/sec N/A N/A
serialize/person/bsatn/count=100 3.5±0.05µs 27.2 MElem/sec N/A N/A
serialize/person/json/count=100 5.9±0.09µs 16.2 MElem/sec N/A N/A
serialize/person/product_value/count=100 1968.3±23.73ns 48.5 MElem/sec N/A N/A
sqlite/disk/empty 483.1±6.83ns 476.8±12.18ns -1.30%
sqlite/disk/filter/string/indexed/load=1000/count=10 6.1±0.07µs 160.2 KElem/sec N/A N/A
sqlite/disk/filter/string/non_indexed/load=1000/count=10 58.2±0.87µs 16.8 KElem/sec N/A N/A
sqlite/disk/filter/u64/indexed/load=1000/count=10 5.9±0.06µs 165.8 KElem/sec N/A N/A
sqlite/disk/filter/u64/non_indexed/load=1000/count=10 43.5±0.78µs 22.4 KElem/sec N/A N/A
sqlite/disk/find_unique/u32/load=1000 2.5±0.04µs 395.8 KElem/sec N/A N/A
sqlite/disk/insert_1/location/multi_index/load=0 16.5±0.35µs 59.0 KElem/sec N/A N/A
sqlite/disk/insert_1/location/multi_index/load=1000 20.8±0.91µs 47.0 KElem/sec N/A N/A
sqlite/disk/insert_1/location/non_unique/load=0 8.2±0.24µs 118.9 KElem/sec N/A N/A
sqlite/disk/insert_1/location/non_unique/load=1000 8.3±0.27µs 117.9 KElem/sec N/A N/A
sqlite/disk/insert_1/location/unique/load=0 8.1±0.18µs 121.3 KElem/sec N/A N/A
sqlite/disk/insert_1/location/unique/load=1000 8.4±0.23µs 115.8 KElem/sec N/A N/A
sqlite/disk/insert_1/person/multi_index/load=0 16.4±0.45µs 59.7 KElem/sec N/A N/A
sqlite/disk/insert_1/person/multi_index/load=1000 21.7±1.16µs 45.0 KElem/sec N/A N/A
sqlite/disk/insert_1/person/non_unique/load=0 8.3±0.15µs 117.0 KElem/sec N/A N/A
sqlite/disk/insert_1/person/non_unique/load=1000 8.7±0.28µs 112.5 KElem/sec N/A N/A
sqlite/disk/insert_1/person/unique/load=0 8.4±0.16µs 116.3 KElem/sec N/A N/A
sqlite/disk/insert_1/person/unique/load=1000 8.8±0.29µs 111.1 KElem/sec N/A N/A
sqlite/disk/insert_bulk/location/multi_index/load=0/count=100 136.2±1.71µs 137.2±2.42µs +0.73%
sqlite/disk/insert_bulk/location/multi_index/load=1000/count=100 227.7±4.97µs 233.3±3.94µs +2.46%
sqlite/disk/insert_bulk/location/non_unique/load=0/count=100 46.0±0.97µs 21.3 KElem/sec N/A N/A
sqlite/disk/insert_bulk/location/non_unique/load=1000/count=100 50.2±0.90µs 19.5 KElem/sec N/A N/A
sqlite/disk/insert_bulk/location/unique/load=0/count=100 48.4±0.64µs 20.2 KElem/sec N/A N/A
sqlite/disk/insert_bulk/location/unique/load=1000/count=100 55.0±1.04µs 17.8 KElem/sec N/A N/A
sqlite/disk/insert_bulk/person/multi_index/load=0/count=100 125.4±1.28µs 126.9±2.23µs +1.20%
sqlite/disk/insert_bulk/person/multi_index/load=1000/count=100 271.7±4.03µs 282.9±5.65µs +4.12%
sqlite/disk/insert_bulk/person/non_unique/load=0/count=100 45.7±0.56µs 21.4 KElem/sec N/A N/A
sqlite/disk/insert_bulk/person/non_unique/load=1000/count=100 63.8±1.41µs 15.3 KElem/sec N/A N/A
sqlite/disk/insert_bulk/person/unique/load=0/count=100 48.8±1.52µs 20.0 KElem/sec N/A N/A
sqlite/disk/insert_bulk/person/unique/load=1000/count=100 56.2±1.03µs 17.4 KElem/sec N/A N/A
sqlite/disk/iterate/location/unique/count=100 8.9±0.14µs 110.1 KElem/sec N/A N/A
sqlite/disk/iterate/person/unique/count=100 9.5±0.16µs 102.4 KElem/sec N/A N/A
sqlite/mem/empty 468.8±6.02ns 468.9±6.75ns +0.02%
sqlite/mem/filter/string/indexed/load=1000/count=10 4.5±0.10µs 216.5 KElem/sec N/A N/A
sqlite/mem/filter/string/non_indexed/load=1000/count=10 58.3±0.76µs 16.7 KElem/sec N/A N/A
sqlite/mem/filter/u64/indexed/load=1000/count=10 4.3±0.09µs 226.6 KElem/sec N/A N/A
sqlite/mem/filter/u64/non_indexed/load=1000/count=10 41.7±0.43µs 23.4 KElem/sec N/A N/A
sqlite/mem/find_unique/u32/load=1000 1129.3±15.97ns 864.8 KElem/sec N/A N/A
sqlite/mem/insert_1/location/multi_index/load=0 4.7±0.06µs 208.1 KElem/sec N/A N/A
sqlite/mem/insert_1/location/multi_index/load=1000 6.3±0.51µs 154.6 KElem/sec N/A N/A
sqlite/mem/insert_1/location/non_unique/load=0 1943.5±86.75ns 502.5 KElem/sec N/A N/A
sqlite/mem/insert_1/location/non_unique/load=1000 2.1±0.08µs 466.9 KElem/sec N/A N/A
sqlite/mem/insert_1/location/unique/load=0 1932.8±37.50ns 505.3 KElem/sec N/A N/A
sqlite/mem/insert_1/location/unique/load=1000 2.1±0.22µs 455.1 KElem/sec N/A N/A
sqlite/mem/insert_1/person/multi_index/load=0 4.5±0.06µs 217.2 KElem/sec N/A N/A
sqlite/mem/insert_1/person/multi_index/load=1000 7.3±0.49µs 134.7 KElem/sec N/A N/A
sqlite/mem/insert_1/person/non_unique/load=0 1963.2±44.81ns 497.4 KElem/sec N/A N/A
sqlite/mem/insert_1/person/non_unique/load=1000 2.2±0.19µs 446.0 KElem/sec N/A N/A
sqlite/mem/insert_1/person/unique/load=0 1963.6±33.06ns 497.3 KElem/sec N/A N/A
sqlite/mem/insert_1/person/unique/load=1000 2.2±0.14µs 439.2 KElem/sec N/A N/A
sqlite/mem/insert_bulk/location/multi_index/load=0/count=100 121.1±1.74µs 121.4±2.63µs +0.25%
sqlite/mem/insert_bulk/location/multi_index/load=1000/count=100 183.3±3.95µs 183.0±4.35µs -0.16%
sqlite/mem/insert_bulk/location/non_unique/load=0/count=100 38.5±0.41µs 25.4 KElem/sec N/A N/A
sqlite/mem/insert_bulk/location/non_unique/load=1000/count=100 42.1±0.66µs 23.2 KElem/sec N/A N/A
sqlite/mem/insert_bulk/location/unique/load=0/count=100 40.7±0.43µs 24.0 KElem/sec N/A N/A
sqlite/mem/insert_bulk/location/unique/load=1000/count=100 46.0±1.08µs 21.2 KElem/sec N/A N/A
sqlite/mem/insert_bulk/person/multi_index/load=0/count=100 112.5±3.15µs 110.9±1.82µs -1.42%
sqlite/mem/insert_bulk/person/multi_index/load=1000/count=100 213.4±2.74µs 213.1±4.54µs -0.14%
sqlite/mem/insert_bulk/person/non_unique/load=0/count=100 38.6±0.65µs 25.3 KElem/sec N/A N/A
sqlite/mem/insert_bulk/person/non_unique/load=1000/count=100 46.2±0.94µs 21.2 KElem/sec N/A N/A
sqlite/mem/insert_bulk/person/unique/load=0/count=100 41.1±0.46µs 23.8 KElem/sec N/A N/A
sqlite/mem/insert_bulk/person/unique/load=1000/count=100 46.2±0.73µs 21.2 KElem/sec N/A N/A
sqlite/mem/iterate/location/unique/count=100 7.8±0.08µs 125.8 KElem/sec N/A N/A
sqlite/mem/iterate/person/unique/count=100 8.1±0.10µs 121.0 KElem/sec N/A N/A
stdb_module/disk/empty 28.0±1.25µs 29.3±1.33µs +4.64%
stdb_module/disk/filter/string/indexed/load=1000/count=10 66.2±4.63µs 14.8 KElem/sec N/A N/A
stdb_module/disk/filter/string/non_indexed/load=1000/count=10 194.1±3.87µs 196.3±10.03µs +1.13%
stdb_module/disk/filter/u64/indexed/load=1000/count=10 48.5±4.17µs 20.1 KElem/sec N/A N/A
stdb_module/disk/filter/u64/non_indexed/load=1000/count=10 162.6±3.71µs 157.3±3.11µs -3.26%
stdb_module/disk/find_unique/u32/load=1000 38.8±2.23µs 25.2 KElem/sec N/A N/A
stdb_module/disk/insert_1/location/multi_index/load=0 59.8±4.93µs 16.3 KElem/sec N/A N/A
stdb_module/disk/insert_1/location/multi_index/load=1000 398.7±39.51µs 445.7±50.43µs +11.79%
stdb_module/disk/insert_1/location/non_unique/load=0 50.8±3.02µs 19.2 KElem/sec N/A N/A
stdb_module/disk/insert_1/location/non_unique/load=1000 326.4±21.34µs 334.4±36.00µs +2.45%
stdb_module/disk/insert_1/location/unique/load=0 53.5±4.08µs 18.3 KElem/sec N/A N/A
stdb_module/disk/insert_1/location/unique/load=1000 358.4±29.54µs 385.5±36.51µs +7.56%
stdb_module/disk/insert_1/person/multi_index/load=0 67.0±4.25µs 14.6 KElem/sec N/A N/A
stdb_module/disk/insert_1/person/multi_index/load=1000 580.4±61.36µs 500.4±68.49µs -13.78%
stdb_module/disk/insert_1/person/non_unique/load=0 59.2±5.91µs 16.5 KElem/sec N/A N/A
stdb_module/disk/insert_1/person/non_unique/load=1000 399.6±35.76µs 327.3±37.96µs -18.09%
stdb_module/disk/insert_1/person/unique/load=0 74.5±19.46µs 13.1 KElem/sec N/A N/A
stdb_module/disk/insert_1/person/unique/load=1000 439.2±58.34µs 413.0±56.47µs -5.97%
stdb_module/disk/insert_bulk/location/multi_index/load=0/count=100 964.1±17.79µs 966.0±23.65µs +0.20%
stdb_module/disk/insert_bulk/location/multi_index/load=1000/count=100 1331.8±59.92µs 1321.8±67.39µs -0.75%
stdb_module/disk/insert_bulk/location/non_unique/load=0/count=100 683.3±13.21µs 689.8±14.43µs +0.95%
stdb_module/disk/insert_bulk/location/non_unique/load=1000/count=100 945.0±34.99µs 925.9±41.42µs -2.02%
stdb_module/disk/insert_bulk/location/unique/load=0/count=100 844.7±22.05µs 830.7±19.44µs -1.66%
stdb_module/disk/insert_bulk/location/unique/load=1000/count=100 1218.2±74.67µs 1115.2±53.90µs -8.46%
stdb_module/disk/insert_bulk/person/multi_index/load=0/count=100 1588.4±33.06µs 1635.7±40.43µs +2.98%
stdb_module/disk/insert_bulk/person/multi_index/load=1000/count=100 2.1±0.09ms 2.1±0.08ms 0.00%
stdb_module/disk/insert_bulk/person/non_unique/load=0/count=100 904.0±18.02µs 883.4±11.39µs -2.28%
stdb_module/disk/insert_bulk/person/non_unique/load=1000/count=100 1147.1±44.30µs 1149.1±53.20µs +0.17%
stdb_module/disk/insert_bulk/person/unique/load=0/count=100 1139.9±21.31µs 1134.1±25.58µs -0.51%
stdb_module/disk/insert_bulk/person/unique/load=1000/count=100 1540.0±53.29µs 1534.6±57.69µs -0.35%
stdb_module/disk/iterate/location/unique/count=100 167.8±11.34µs 153.1±6.42µs -8.76%
stdb_module/disk/iterate/person/unique/count=100 264.8±8.93µs 252.1±6.22µs -4.80%
stdb_module/large_arguments/64KiB 121.7±1.69µs 122.3±3.53µs +0.49%
stdb_module/mem/empty 29.3±1.05µs 29.4±1.30µs +0.34%
stdb_module/mem/filter/string/indexed/load=1000/count=10 66.2±6.43µs 14.8 KElem/sec N/A N/A
stdb_module/mem/filter/string/non_indexed/load=1000/count=10 198.3±23.24µs 197.7±18.68µs -0.30%
stdb_module/mem/filter/u64/indexed/load=1000/count=10 50.3±3.36µs 19.4 KElem/sec N/A N/A
stdb_module/mem/filter/u64/non_indexed/load=1000/count=10 158.0±4.78µs 153.6±5.37µs -2.78%
stdb_module/mem/find_unique/u32/load=1000 38.5±2.86µs 25.3 KElem/sec N/A N/A
stdb_module/mem/insert_1/location/multi_index/load=0 48.2±2.55µs 20.3 KElem/sec N/A N/A
stdb_module/mem/insert_1/location/multi_index/load=1000 371.7±37.94µs 347.1±34.00µs -6.62%
stdb_module/mem/insert_1/location/non_unique/load=0 44.0±2.85µs 22.2 KElem/sec N/A N/A
stdb_module/mem/insert_1/location/non_unique/load=1000 273.0±25.79µs 278.0±30.52µs +1.83%
stdb_module/mem/insert_1/location/unique/load=0 49.0±3.58µs 19.9 KElem/sec N/A N/A
stdb_module/mem/insert_1/location/unique/load=1000 324.9±31.24µs 308.1±22.41µs -5.17%
stdb_module/mem/insert_1/person/multi_index/load=0 54.2±4.59µs 18.0 KElem/sec N/A N/A
stdb_module/mem/insert_1/person/multi_index/load=1000 531.6±62.39µs 508.9±77.35µs -4.27%
stdb_module/mem/insert_1/person/non_unique/load=0 48.8±3.17µs 20.0 KElem/sec N/A N/A
stdb_module/mem/insert_1/person/non_unique/load=1000 322.1±33.14µs 329.7±29.45µs +2.36%
stdb_module/mem/insert_1/person/unique/load=0 51.7±4.57µs 18.9 KElem/sec N/A N/A
stdb_module/mem/insert_1/person/unique/load=1000 366.6±39.90µs 411.1±82.32µs +12.14%
stdb_module/mem/insert_bulk/location/multi_index/load=0/count=100 852.4±42.55µs 849.6±26.46µs -0.33%
stdb_module/mem/insert_bulk/location/multi_index/load=1000/count=100 1150.3±42.73µs 1172.0±46.42µs +1.89%
stdb_module/mem/insert_bulk/location/non_unique/load=0/count=100 574.2±17.29µs 558.7±10.67µs -2.70%
stdb_module/mem/insert_bulk/location/non_unique/load=1000/count=100 737.8±28.74µs 762.9±25.05µs +3.40%
stdb_module/mem/insert_bulk/location/unique/load=0/count=100 711.3±12.99µs 709.4±10.87µs -0.27%
stdb_module/mem/insert_bulk/location/unique/load=1000/count=100 982.4±33.84µs 961.6±31.42µs -2.12%
stdb_module/mem/insert_bulk/person/multi_index/load=0/count=100 1510.2±36.66µs 1505.3±34.24µs -0.32%
stdb_module/mem/insert_bulk/person/multi_index/load=1000/count=100 1911.5±80.93µs 1993.7±68.77µs +4.30%
stdb_module/mem/insert_bulk/person/non_unique/load=0/count=100 801.5±26.14µs 807.4±17.99µs +0.74%
stdb_module/mem/insert_bulk/person/non_unique/load=1000/count=100 1039.3±49.11µs 1021.2±46.76µs -1.74%
stdb_module/mem/insert_bulk/person/unique/load=0/count=100 1045.6±18.78µs 1051.0±23.29µs +0.52%
stdb_module/mem/insert_bulk/person/unique/load=1000/count=100 1422.4±58.56µs 1430.6±56.34µs +0.58%
stdb_module/mem/iterate/location/unique/count=100 165.9±28.11µs 151.3±1.72µs -8.80%
stdb_module/mem/iterate/person/unique/count=100 268.4±8.75µs 254.7±3.29µs -5.10%
stdb_module/print_bulk/lines=1 39.5±2.51µs 38.7±3.15µs -2.03%
stdb_module/print_bulk/lines=100 367.3±14.31µs 374.1±15.59µs +1.85%
stdb_module/print_bulk/lines=1000 3.3±0.05ms 3.4±0.08ms +3.03%
stdb_raw/disk/empty 114.1±1.28ns 112.5±1.21ns -1.40%
stdb_raw/disk/filter/string/indexed/load=1000/count=10 2.9±0.05µs 337.3 KElem/sec N/A N/A
stdb_raw/disk/filter/string/non_indexed/load=1000/count=10 132.8±2.36µs 131.7±2.09µs -0.83%
stdb_raw/disk/filter/u64/indexed/load=1000/count=10 2.8±0.04µs 354.6 KElem/sec N/A N/A
stdb_raw/disk/filter/u64/non_indexed/load=1000/count=10 115.1±1.12µs 113.3±1.91µs -1.56%
stdb_raw/disk/find_unique/u32/load=1000 631.1±15.47ns 1547.5 KElem/sec N/A N/A
stdb_raw/disk/insert_1/location/multi_index/load=0 7.0±0.20µs 139.3 KElem/sec N/A N/A
stdb_raw/disk/insert_1/location/multi_index/load=1000 39.6±3.40µs 24.6 KElem/sec N/A N/A
stdb_raw/disk/insert_1/location/non_unique/load=0 4.5±0.09µs 217.8 KElem/sec N/A N/A
stdb_raw/disk/insert_1/location/non_unique/load=1000 23.9±1.14µs 40.8 KElem/sec N/A N/A
stdb_raw/disk/insert_1/location/unique/load=0 5.8±0.16µs 169.4 KElem/sec N/A N/A
stdb_raw/disk/insert_1/location/unique/load=1000 32.2±5.42µs 30.3 KElem/sec N/A N/A
stdb_raw/disk/insert_1/person/multi_index/load=0 11.4±0.19µs 85.3 KElem/sec N/A N/A
stdb_raw/disk/insert_1/person/multi_index/load=1000 38.9±4.16µs 25.1 KElem/sec N/A N/A
stdb_raw/disk/insert_1/person/non_unique/load=0 5.2±0.07µs 189.0 KElem/sec N/A N/A
stdb_raw/disk/insert_1/person/non_unique/load=1000 19.9±1.11µs 49.1 KElem/sec N/A N/A
stdb_raw/disk/insert_1/person/unique/load=0 7.6±0.11µs 127.9 KElem/sec N/A N/A
stdb_raw/disk/insert_1/person/unique/load=1000 31.3±2.61µs 31.2 KElem/sec N/A N/A
stdb_raw/disk/insert_bulk/location/multi_index/load=0/count=100 409.9±7.80µs 412.3±5.98µs +0.59%
stdb_raw/disk/insert_bulk/location/multi_index/load=1000/count=100 492.7±18.23µs 496.8±16.03µs +0.83%
stdb_raw/disk/insert_bulk/location/non_unique/load=0/count=100 183.9±2.84µs 186.9±2.49µs +1.63%
stdb_raw/disk/insert_bulk/location/non_unique/load=1000/count=100 212.6±6.39µs 216.8±5.59µs +1.98%
stdb_raw/disk/insert_bulk/location/unique/load=0/count=100 295.5±3.52µs 291.9±4.43µs -1.22%
stdb_raw/disk/insert_bulk/location/unique/load=1000/count=100 367.4±8.09µs 362.1±15.93µs -1.44%
stdb_raw/disk/insert_bulk/person/multi_index/load=0/count=100 840.3±22.39µs 823.4±15.06µs -2.01%
stdb_raw/disk/insert_bulk/person/multi_index/load=1000/count=100 956.0±21.60µs 909.1±24.89µs -4.91%
stdb_raw/disk/insert_bulk/person/non_unique/load=0/count=100 255.3±5.03µs 253.0±2.47µs -0.90%
stdb_raw/disk/insert_bulk/person/non_unique/load=1000/count=100 290.0±10.31µs 286.1±6.68µs -1.34%
stdb_raw/disk/insert_bulk/person/unique/load=0/count=100 473.2±9.93µs 469.7±6.28µs -0.74%
stdb_raw/disk/insert_bulk/person/unique/load=1000/count=100 535.3±19.09µs 533.4±17.84µs -0.35%
stdb_raw/disk/iterate/location/unique/count=100 10.9±0.13µs 89.9 KElem/sec N/A N/A
stdb_raw/disk/iterate/person/unique/count=100 12.4±0.22µs 78.7 KElem/sec N/A N/A
stdb_raw/mem/empty 113.4±1.78ns 112.1±1.21ns -1.15%
stdb_raw/mem/filter/string/indexed/load=1000/count=10 2.9±0.07µs 340.4 KElem/sec N/A N/A
stdb_raw/mem/filter/string/non_indexed/load=1000/count=10 132.7±1.56µs 131.8±1.13µs -0.68%
stdb_raw/mem/filter/u64/indexed/load=1000/count=10 2.7±0.04µs 358.6 KElem/sec N/A N/A
stdb_raw/mem/filter/u64/non_indexed/load=1000/count=10 115.2±1.43µs 113.1±2.50µs -1.82%
stdb_raw/mem/find_unique/u32/load=1000 627.1±10.31ns 1557.3 KElem/sec N/A N/A
stdb_raw/mem/insert_1/location/multi_index/load=0 5.3±0.09µs 183.1 KElem/sec N/A N/A
stdb_raw/mem/insert_1/location/multi_index/load=1000 31.0±1.52µs 31.5 KElem/sec N/A N/A
stdb_raw/mem/insert_1/location/non_unique/load=0 2.9±0.04µs 340.6 KElem/sec N/A N/A
stdb_raw/mem/insert_1/location/non_unique/load=1000 20.8±0.96µs 47.0 KElem/sec N/A N/A
stdb_raw/mem/insert_1/location/unique/load=0 3.9±0.05µs 251.5 KElem/sec N/A N/A
stdb_raw/mem/insert_1/location/unique/load=1000 26.8±1.28µs 36.4 KElem/sec N/A N/A
stdb_raw/mem/insert_1/person/multi_index/load=0 9.5±0.12µs 102.5 KElem/sec N/A N/A
stdb_raw/mem/insert_1/person/multi_index/load=1000 32.5±2.77µs 30.1 KElem/sec N/A N/A
stdb_raw/mem/insert_1/person/non_unique/load=0 3.5±0.10µs 277.0 KElem/sec N/A N/A
stdb_raw/mem/insert_1/person/non_unique/load=1000 16.4±1.04µs 59.5 KElem/sec N/A N/A
stdb_raw/mem/insert_1/person/unique/load=0 5.8±0.12µs 169.2 KElem/sec N/A N/A
stdb_raw/mem/insert_1/person/unique/load=1000 24.7±2.02µs 39.5 KElem/sec N/A N/A
stdb_raw/mem/insert_bulk/location/multi_index/load=0/count=100 421.1±7.39µs 406.9±5.14µs -3.37%
stdb_raw/mem/insert_bulk/location/multi_index/load=1000/count=100 473.3±15.37µs 468.3±12.01µs -1.06%
stdb_raw/mem/insert_bulk/location/non_unique/load=0/count=100 178.9±3.40µs 175.2±2.79µs -2.07%
stdb_raw/mem/insert_bulk/location/non_unique/load=1000/count=100 201.1±3.44µs 203.3±6.48µs +1.09%
stdb_raw/mem/insert_bulk/location/unique/load=0/count=100 299.0±51.33µs 289.7±3.28µs -3.11%
stdb_raw/mem/insert_bulk/location/unique/load=1000/count=100 351.7±7.94µs 348.9±6.92µs -0.80%
stdb_raw/mem/insert_bulk/person/multi_index/load=0/count=100 817.4±12.60µs 804.7±12.12µs -1.55%
stdb_raw/mem/insert_bulk/person/multi_index/load=1000/count=100 919.9±27.56µs 888.0±24.71µs -3.47%
stdb_raw/mem/insert_bulk/person/non_unique/load=0/count=100 248.9±4.12µs 249.1±3.74µs +0.08%
stdb_raw/mem/insert_bulk/person/non_unique/load=1000/count=100 276.5±5.78µs 276.1±6.14µs -0.14%
stdb_raw/mem/insert_bulk/person/unique/load=0/count=100 464.7±4.47µs 460.8±7.13µs -0.84%
stdb_raw/mem/insert_bulk/person/unique/load=1000/count=100 534.7±15.98µs 528.1±15.88µs -1.23%
stdb_raw/mem/iterate/location/unique/count=100 10.8±0.16µs 90.1 KElem/sec N/A N/A
stdb_raw/mem/iterate/person/unique/count=100 12.4±0.49µs 78.8 KElem/sec N/A N/A

Please sign in to comment.