Skip to content

Non-default types for keys#17

Open
Altickium wants to merge 11 commits intoITMO-PTDC-Team:masterfrom
Altickium:multi-type-keys
Open

Non-default types for keys#17
Altickium wants to merge 11 commits intoITMO-PTDC-Team:masterfrom
Altickium:multi-type-keys

Conversation

@Altickium
Copy link
Copy Markdown
Contributor

No description provided.

@Altickium
Copy link
Copy Markdown
Contributor Author

Я решил добавить KeyConverter в thread_loop.h, т.к. тащить данные через 3 структуры (От dataMap и до threadLoop) кажется сложнее, чем добавить конвертер, который зависит только от датамапа.

Copy link
Copy Markdown
Member

@Mr-Ravil Mr-Ravil left a comment

Choose a reason for hiding this comment

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

Первый взгляд на решение. Подробрее гляну на выходных. А так же посмотрю по поводу garbage, и отпишусь по нему отдельно

Comment thread cpp/microbench/workloads/data_maps/int_data_map.h Outdated
Comment thread cpp/microbench/workloads/data_maps/string_data_map.h Outdated
Comment thread cpp/microbench/workloads/index_maps/builders/array_index_map_builder.h Outdated
Comment thread cpp/microbench/workloads/index_maps/builders/array_index_map_builder.h Outdated
Comment thread cpp/microbench/workloads/index_maps/builders/id_index_map_builder.h Outdated
Comment thread cpp/microbench/workloads/thread_loops/thread_loop.h
Comment thread cpp/microbench/globals_t_impl.h
Comment thread cpp/microbench/workloads/args_generators/impls/creakers_and_wave_args_generator.h Outdated
Comment thread cpp/microbench/workloads/index_maps/index_map.h Outdated
Comment thread cpp/microbench/workloads/index_maps/index_map.h Outdated
Comment thread cpp/microbench/globals_t.h Outdated
Comment thread cpp/microbench/global_types.h Outdated
Comment thread cpp/microbench/globals_t_impl.h
Comment thread cpp/microbench/workloads/thread_loops/thread_loop_impl.h Outdated
Comment thread cpp/microbench/workloads/bench_parameters.h Outdated
Comment thread cpp/microbench/workloads/data_maps/data_map_json_converter.h Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

было бы ещё неплохо добавить пример с DataMap

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Было бы неплохо добавить информацию о DataMap в toString

Comment thread cpp/microbench/global_types.h Outdated
Comment thread cpp/microbench/global_types.h Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

кажется этого не должно быть в дифе, тк схема жсона не меняется, а меняются только значения

Comment on lines +25 to +33
#ifdef USE_STRING
#include "string_data_map.h"
return new StringDataMap(1);
#endif
} else if constexpr (std::is_same_v<KEY_TYPE, long long>) {
#ifdef USE_LONG_LONG
#include "int_data_map.h"
return new IntDataMap(1);
#endif
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

зачем инклюдить тут? не надо так делать, заинклюдь как обычно выше

Comment on lines -8 to +18
typedef long long test_type;
#include "global_types.h"

#ifdef REDIS
#define VALUE_TYPE test_type
#define KEY_TO_VALUE(key) key
#define GET_FUNC executeContains
#else
#define VALUE_TYPE void *
#define KEY_TO_VALUE(key) &key /* note: hack to turn a key into a pointer */
#define GET_FUNC executeGet
#endif

#define DS_ADAPTER_T ds_adapter<test_type, VALUE_TYPE, RECLAIM<>, ALLOC<>, POOL<> >
#define DS_ADAPTER_T ds_adapter<KEY_TYPE, VALUE_TYPE, RECLAIM<>, ALLOC<>, POOL<> >
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

так может все это в целом перенести в global types? зачем размазывать по разным файлам

@Mr-Ravil Mr-Ravil deleted the branch ITMO-PTDC-Team:master October 16, 2025 19:16
@Mr-Ravil Mr-Ravil closed this Oct 16, 2025
@Mr-Ravil Mr-Ravil reopened this Oct 16, 2025
@Mr-Ravil Mr-Ravil changed the base branch from cpp-develop to master October 16, 2025 19:23
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