Skip to content

Conversation

@avsej
Copy link
Member

@avsej avsej commented Aug 17, 2023

Base API Transactional API
Sequential/Sync
1000 mutations 257516ms (257s) 528866ms (528s)
1000 fetches 254689ms (254s) 259406ms (259s)
total time 512205ms (512s) 788273ms (788s)
Bulk/Async
1000 mutations 2065ms (2s) 261443ms (261s)
1000 fetches 4551ms (4s) 3764ms (3s)
total time 6618ms (6s) 265208ms (265s)

Output of bulk_base_api.cxx

CB_CONNECTION_STRING=couchbase://172.23.111.135,172.23.111.134,172.23.111.133
CB_USERNAME=Administrator
CB_PASSWORD=password
CB_BUCKET_NAME=default
CB_SCOPE_NAME=_default
CB_COLLECTION_NAME=_default
CB_NUMBER_OF_OPERATIONS=1000
CB_DOCUMENT_BODY_SIZE=1024

===== SEQUENTIAL
Using 1000 IDs in interval ["sequential_000000"..."sequential_000999"]
Executed 1000 upsert operations in 257516ms (257516719us, 257s), average latency: 257ms
	Success: 1000
Executed 1000 get operations in 254689ms (254689129us, 254s), average latency: 254ms
	Success: 1000
Total time for sequential execution 512205ms (512205903us, 512s)

===== BULK
Using 1000 IDs in interval ["bulk_000000"..."bulk_000999"]
Scheduled 1000 upsert operations in 182ms (182010us, 0s)
Completed 1000 upsert operations in 1883ms (1883821us, 1s)
Executed 1000 upsert operations in 2065ms (2065857us, 2s), average latency: 2ms
	Success: 1000
Scheduled 1000 get operations in 124ms (124952us, 0s)
Completed 1000 get operations in 4426ms (4426546us, 4s)
Executed 1000 get operations in 4551ms (4551527us, 4s), average latency: 4ms
	Success: 1000
Total time for bulk execution 6618ms (6618806us, 6s)

Output of bulk_transactional_api.cxx

CB_CONNECTION_STRING=couchbase://172.23.111.135,172.23.111.134,172.23.111.133
CB_USERNAME=Administrator
CB_PASSWORD=password
CB_BUCKET_NAME=default
CB_SCOPE_NAME=_default
CB_COLLECTION_NAME=_default
CB_NUMBER_OF_OPERATIONS=1000
CB_DOCUMENT_BODY_SIZE=1024
CB_TRANSACTION_EXPIRATION_TIME=6000

===== SEQUENTIAL
Using 1000 IDs in interval ["tx_sequential_000000"..."tx_sequential_000999"]
Removing 1000 IDs in collection "_default._default"
Removed 1000 keys in 3409ms (3409877us, 3s)
	document_not_found (101): 1000
Executed transaction with 1000 insert operations in 528866ms (528866677us, 528s), average latency: 528ms
	Transaction status: Success, cause=Success
	Success: 1000
Executed transaction with 1000 get operations in 259406ms (259406504us, 259s), average latency: 259ms
	Transaction status: Success, cause=Success
	Success: 1000
Total time for sequential execution 788273ms (788273282us, 788s)

===== BULK
Using 1000 IDs in interval ["tx_bulk_000000"..."tx_bulk_000999"]
Removing 1000 IDs in collection "_default._default"
Removed 1000 keys in 1111ms (1111947us, 1s)
	document_not_found (101): 1000
Scheduled transaction with 1000 insert operations in 0ms (52us, 0s)
Executed transaction with 1000 insert operations in 261443ms (261443797us, 261s), average latency: 261ms
	Transaction status: Success, cause=Success
	Success: 1000
Scheduled transaction with 1000 get operations in 0ms (69us, 0s)
Executed transaction with 1000 get operations in 3764ms (3764199us, 3s), average latency: 3ms
	Transaction status: Success, cause=Success
	Success: 1000
Total time for bulk execution 265208ms (265208320us, 265s)

Copy link
Contributor

@thejcfactor thejcfactor left a comment

Choose a reason for hiding this comment

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

Just had a question on the handful of statements that populate the errors map (errors[ctx.ec().message()]++;). Might be good to have those wrapped w/ an if statement so the example doesn't print out the count of undefined errors.

thejcfactor
thejcfactor previously approved these changes Aug 22, 2023
Copy link
Contributor

@thejcfactor thejcfactor left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@avsej avsej force-pushed the CXXCBC-363-bulk-examples branch 2 times, most recently from e1797d3 to 9cfa85e Compare September 11, 2023 23:34
@avsej avsej force-pushed the CXXCBC-363-bulk-examples branch from 9cfa85e to 75abeba Compare September 19, 2023 15:38
@avsej avsej force-pushed the CXXCBC-363-bulk-examples branch 2 times, most recently from c562d6c to a07b62e Compare September 26, 2023 01:04
@avsej avsej force-pushed the CXXCBC-363-bulk-examples branch from a07b62e to 8a90d04 Compare September 26, 2023 01:06
@avsej avsej requested a review from thejcfactor September 26, 2023 03:21
@avsej avsej merged commit 61fa67d into couchbase:main Sep 26, 2023
@avsej avsej deleted the CXXCBC-363-bulk-examples branch September 26, 2023 03:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants