[MONGOCRYPT-589] Export mongocrypt_binary_t Created: 30/Aug/23  Updated: 28/Oct/23  Resolved: 12/Sep/23

Status: Closed
Project: Libmongocrypt
Component/s: None
Affects Version/s: None
Fix Version/s: 1.9.0

Type: Improvement Priority: Unknown
Reporter: Kevin Albertson Assignee: Kevin Albertson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to DRIVERS-2581 Benchmark and use `mongocrypt_binary_... Implementing
Binding Changes: Needed

 Description   

Scope

  • Export definition of mongocrypt_binary_t so consumers do not need to use mongocrypt_binary_data and mongocrypt_binary_len.

Motivation

Languages interfacing with libmongocrypt may observe slower throughput with frequent calls to C functions. Using the struct definition directly may improve performance for libmongocrypt operations.

DRIVERS-2581 identifies a problematic workload: decrypting documents with 1500 encrypted values.

Profiling showed mongocrypt_binary_data and mongocrypt_binary_len including significant samples.

A prototype benchmark showed improvement by using the struct definition directly, rather than calling mongocrypt_binary_data and mongocrypt_binary_len:

run_test 'Baseline' ... begin
Baseline   (ms): 9.868333
Decrypting (ms): 35.971542
Overhead   (ms): 26.103209
Overhead   (+%): 264.51487804475187
run_test 'Baseline' ... end
run_test 'With Java using mongocrypt_binary_t definition' ... begin
Baseline   (ms): 9.756125
Decrypting (ms): 31.031459
Overhead   (ms): 21.275334
Overhead   (+%): 218.071560173737
run_test 'With Java using mongocrypt_binary_t definition' ... end



 Comments   
Comment by Githook User [ 12/Sep/23 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: MONGOCRYPT-589 export `mongocrypt_binary_t` (#693)

  • export `mongocrypt_binary_t`
Comment by Cloud GitHub Webhooks [ 12/Sep/23 ]

kevinAlbs merged a pull request (MONGOCRYPT-589 export `mongocrypt_binary_t`) into the following branch:
master: c907e762b5f476ac442944282dc1d8cf34ae55de

Comment by Githook User [ 05/Sep/23 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: MONGOCRYPT-589 Add bulk decrypt benchmark with Java bindings (#690)

  • add BenchmarkRunner

Benchmark decrypts a document with 1500 encrypted fields.
Intended to benchmark a reported slow workload.

  • apply `repositories` to all projects
  • add `benchmark-java.sh`

Intended to run in CI. May be run locally.

Comment by Cloud GitHub Webhooks [ 05/Sep/23 ]

kevinAlbs merged a pull request (MONGOCRYPT-589 Add bulk decrypt benchmark with Java bindings) into the following branch:
master: ce14f0cebfe9d33bf5d2f5467a0fb8a36908e80c

Generated at Thu Feb 08 09:09:02 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.