uniqcheck

command
v1.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package main seeks to determine if the approach used delivers sufficiently unique IDs in go applications potentially running multiple goroutines.

Considerations:

- objective: keep IDs and their encoded representation short - you can generate a lot of random numbers in 1 second - is 48 bits of randomness per second enough - using a faster, scalable, random generator raises the bar

In addition to this test, a single-threaded test using stdout / sort / uniq, a run of 10 million or more results in no duplicates on various test machines:

rid -c 10000000 | sort | uniq -d
(no output, meaning no duplicates)

Running this test results in output like: Total keys: 40,000,000. Keys in last time tick: 1,825,240. Number of dupes: 0

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL