This is intended for benchmarking, to measure the overhead of just the
non-cryptographic operations.
/* Disable aggregating of data into log segments. Each object will be
* stored in a separate segment. */
int disable_aggregation;
+
+ /* Disable cryptography. This is for benchmarking purposes. */
+ int disable_crypto;
} BlueSkyOptions;
extern BlueSkyOptions bluesky_options;
void bluesky_crypt_block_encrypt(gchar *cloud_block, size_t len,
BlueSkyCryptKeys *keys)
{
+ if (bluesky_options.disable_crypto)
+ return;
+
gcry_error_t status;
gcry_cipher_hd_t handle;
g_assert(memcmp(header->magic, CLOUDLOG_MAGIC_ENCRYPTED,
sizeof(header->magic)) == 0);
+ if (bluesky_options.disable_crypto) {
+ g_assert(encrypted == FALSE);
+ return TRUE;
+ }
+
if (encrypted != bluesky_crypt_block_needs_encryption(header->type)) {
g_warning("Encrypted status of item does not match expected!\n");
}
{"BLUESKY_CACHE_SIZE", &bluesky_options.cache_size},
{"BLUESKY_OPT_FULL_SEGMENTS", &bluesky_options.full_segment_fetches},
{"BLUESKY_OPT_NO_AGGREGATION", &bluesky_options.disable_aggregation},
+ {"BLUESKY_OPT_NO_CRYPTO", &bluesky_options.disable_crypto},
{NULL, NULL}
};