Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[C++] use customed key-value type #407

Closed
pentium3 opened this issue Feb 22, 2021 · 5 comments
Closed

[C++] use customed key-value type #407

pentium3 opened this issue Feb 22, 2021 · 5 comments

Comments

@pentium3
Copy link

Hi. In the current implementation I found that both keys and values are uint64_t. https://github.com/microsoft/FASTER/blob/master/cc/benchmark-dir/benchmark.cc#L104

How could I modify to support 1KB string type value?

Thanks

@badrishc
Copy link
Contributor

badrishc commented Feb 22, 2021

The test samples show how to use larger and/or variable-length keys and values. For example, see this one:

TEST(InMemFaster, UpsertRead_Concurrent) {

You will need to modify the benchmark yourself to handle this along such lines.

@pentium3
Copy link
Author

pentium3 commented Mar 8, 2021

Thanks. Do you support user-defined key size as well?

@badrishc
Copy link
Contributor

badrishc commented Mar 8, 2021

Yes, in the linked test page there is an example with custom keys.

@pentium3
Copy link
Author

pentium3 commented Mar 8, 2021

Thanks. Do you mena in this example?

TEST(InMemFaster, UpsertRead_VariableLengthKey) {

what's the difference between Key and ShallowKey in this case?

@badrishc
Copy link
Contributor

Not sure, you need to go through all samples.

ShallowKey: #282

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

No branches or pull requests

2 participants