Skip to content

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

Merged
Cyan4973 merged 7 commits intofacebook:devfrom
ephiepark:dev
Jun 4, 2019
Merged

zstdcli : expose cpu load indicator for each file on -vv mode#1631
Cyan4973 merged 7 commits intofacebook:devfrom
ephiepark:dev

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.

3 participants