tweak, bump version, prepare for next release

This commit is contained in:
Joe Ardent 2023-07-29 16:16:13 -07:00
parent d25691795f
commit 2484d5156b
3 changed files with 25 additions and 8 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "julid-rs"
version = "1.6.18"
version = "1.6.180"
authors = ["Joe Ardent <code@ardent.nebcorp.com>"]
edition = "2021"
keywords = ["ulid", "library", "sqlite", "extension", "julid"]
@ -18,7 +18,7 @@ sqlx = ["dep:sqlx"]
# WARNING! don't enable this feature in your project's Cargo.toml if using julid-rs as a dependency;
# see https://gitlab.com/nebkor/julid/-/issues/1
plugin = ["sqlite-loadable"] # builds libjulid.* for loading into sqlite
plugin = ["dep:sqlite-loadable"] # builds libjulid.* for loading into sqlite
[lib]
name = "julid"
@ -32,5 +32,8 @@ serde = { version = "1.0", features = ["derive"], optional = true }
sqlx = { version = "0.7", features = ["sqlite"], default-features = false, optional = true }
sqlite-loadable = { version = "0.0.5", optional = true }
[dev-dependencies]
clap = { version = "4.3.19", default-features = false, features = ["help", "usage", "std", "derive"] }
[package.metadata.docs.rs]
all-features = true

View File

@ -1 +1 @@
1.618
1.6180

View File

@ -1,23 +1,37 @@
use std::time::Instant;
use clap::Parser;
use julid::Julid;
#[derive(Debug, Parser)]
struct Cli {
#[clap(
long,
short,
help = "Number of Julids to generate",
default_value_t = 2_000
)]
pub num: usize,
}
fn main() {
let mut v = Vec::with_capacity(2000);
let cli = Cli::parse();
let num = cli.num;
let mut v = Vec::with_capacity(num);
let start = Instant::now();
for _ in 0..2000 {
for _ in 0..num {
v.push(Julid::new());
}
let end = Instant::now();
let dur = (end - start).as_micros();
for id in v.iter() {
println!(
eprintln!(
"{id}: created_at {}; counter: {}; sortable: {}",
id.created_at(),
id.counter(),
id.sortable()
);
}
println!("2000 IDs generated in {dur}us");
println!("{num} Julids generated in {dur}us");
}