It is Go executable app which:
- accepts a file with a list of IP addresses (one per line)
- for each IP, increments its count in Aerospike
- at the end it writes summary that includes
- the count of each ip in the run
- total time taken to process the file
- total time taken to generate statistics
- it supports both aerospike interaction mode:
syncorasync
To build the application it is required to have:
- Go 1.25 installed
To run intergration and benchark tests it is required to have installed:
- docker
- docker compose
To run executable (amd64) it is required to:
- have installed docker and docker compose
OR
- have your locall (or remote) instance of Aerospike
You can check all available input flags by invoking
./bin/ipcounter --help
There are two flags required:
- path - string; Path to the input file
- mode - string; Aerospike integration mode. Allowed values: sync, async
You can run the program with default config and using commands:
-
make go_run_sync_file
-
make go_run_async_file
Those commands start fresh aerospike container every time when executed
To start unit tests please call the command:
make go_test_unit
To start integration tests please call the command:
make go_test_integration
To start integration test please call the command:
make go_test_benchmark
This commands process 513483 ip addresses in async mode