google / stenographer

Stenographer is a packet capture solution which aims to quickly spool all packets to disk, then provide simple, fast access to subsets of those packets. Discussion/announcements at stenographer@googlegroups.com
Apache License 2.0
1.79k stars 238 forks source link

fix bugs related to introduction of flag --blocksize_kb #212

Closed emillynge closed 5 years ago

emillynge commented 5 years ago

Dear maintainers

Please accept this PR which fixes a couple of issues that has arisen due to the introduction of --blocksize_kb option.

In general these issue stem from the previous assumption that a block is 1MB.

To fix the issue, i've introduced a new variable blocks_per_file which is determined by the values flag_filesize_mband flag_blocksize_kb.

I'm not entirely sure whether the pattern of calculating blocks_per_file in the switch block is the right way to go.

googlebot commented 5 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.