Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zstdcli : expose cpu load indicator for each file on -vv mode #1631

Merged
merged 7 commits into from
Jun 4, 2019

Conversation

ephiepark
Copy link
Contributor

Moved the logic to measure elapsed time and cpu load from FIO_compressFilename to FIO_compressFilename_internal.

  1. FIO_compressFilename is only used for single file case. If we want to show elapsed time and cpu load for each file in multiple file scenario, the measurement needs to be done in FIO_compressFilename_internal, which is called by both single and multiple file scenarios.
  2. I could have added the logic to FIO_compressFilename_internal, FIO_compressFilename_dstFile, or FIO_compressFilename_srcFile. I thought FIO_compressFilename_internal is a good fit since it already has logic to print stats about compression (compression ratio). I see elapsed time and cpu load as the extension to the stats.

@Cyan4973
Copy link
Contributor

Cyan4973 commented Jun 4, 2019

Looks good to me !

I believe you selected the right place to provide this capability.

Also, the patch uses a single location, doesn't bleed its logic outside of its block, and is easy to follow.
These are good properties for its maintenance.

@Cyan4973 Cyan4973 merged commit c6ca65a into facebook:dev Jun 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants