bench: Improve benchmark_decrypting.rs benchmark

This commit is contained in:
Hocuri
2025-08-11 16:29:34 +02:00
parent 479a5632fb
commit 2efbbcc669
4 changed files with 92 additions and 51 deletions

View File

@@ -38,3 +38,7 @@ pub async fn save_broadcast_shared_secret(
pub fn create_dummy_keypair(addr: &str) -> Result<KeyPair> {
pgp::create_keypair(EmailAddress::new(addr)?)
}
pub fn create_broadcast_shared_secret() -> String {
crate::tools::create_broadcast_shared_secret()
}

View File

@@ -113,7 +113,7 @@ pub mod peer_channels;
pub mod reaction;
#[cfg(feature = "internals")]
pub mod benchmark_internals;
pub mod internals_for_benchmarks;
/// If set IMAP/incoming and SMTP/outgoing MIME messages will be printed.
pub const DCC_MIME_DEBUG: &str = "DCC_MIME_DEBUG";

View File

@@ -319,11 +319,6 @@ pub(crate) fn create_broadcast_shared_secret() -> String {
res
}
#[cfg(feature = "internals")]
pub fn create_broadcast_shared_secret_pub() -> String {
create_broadcast_shared_secret()
}
/// Returns true if given string is a valid ID.
///
/// All IDs generated with `create_id()` should be considered valid.