Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IpV4 Address Counter

App calculates the number of unique IPv4 addresses in a given file and print the result.

Features:

  • Processing large files
  • Ready-to-work with simple CLI
  • Supports goroutines for faster processing

Usage

Build project into binary:

make build-mac

Supports two modes of operation:

  1. Without goroutines
./bin/counter -path="path_to_file"
  1. With goroutines
./bin/counter -path="path_to_file" -allowParallel=true

Note: by default, the app will use the first mode. To use the second mode, you need to specify the -allowParallel flag.

Benchmarks

Tested on large file.

Without goroutines:

Unique ips:  1000000000
Total time: 8m39.046350542s
Alloc = 577 MiB TotalAlloc = 122578 MiB Sys = 1075 MiB  NumGC = 241

With goroutines (5 workers):

Unique ips:  1000000000
Total time: 4m34.130946167s
Alloc = 556 MiB TotalAlloc = 122582 MiB Sys = 1079 MiB  NumGC = 241

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages