Packages

High-performance lock-free Snowflake ID generator

Current section

Files

Jump to
snow rebar.config
Raw

rebar.config

{erl_opts, [
debug_info,
% Snowflake ID structure configuration (can be overridden at compile time)
% sequence_bits is calculated as: 64 - 1 - timestamp_bits - region_bits - worker_bits
% Default: 1 + 41 + 4 + 6 + (64-1-41-4-6=12) = 64 bits
{d, timestamp_bits, 41}, % Timestamp bits (default: 41, supports ~69 years)
{d, region_bits, 4}, % Region bits (default: 4, supports 16 regions)
{d, worker_bits, 6} % Worker bits (default: 6, supports 64 workers)
]}.
{deps, []}.
{shell, [
{config, "config/sys.config"},
{apps, [snow]}
]}.
{hex, [{doc, edoc}]}.
{ct_opts, [
{sys_config, ["config/test.config"]}
]}.
{profiles, [
{test, [
{deps, []}
]},
{bench, [
{erl_opts, [
{hipe, [o3]},
inline_list_funcs,
{inline_size, 100}
]}
]}
]}.