Created
May 17, 2018 03:54
-
-
Save devlights/97029a482ef9fc78aa4ae25a7f42f6c7 to your computer and use it in GitHub Desktop.
[python][windows] relog コマンドを 再帰的に実行して blg ファイルを csv に変換 (パフォーマンスカウンタ, バイナリからCSVへ変換)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import pathlib | |
import subprocess | |
def main(args): | |
for p in pathlib.Path(args.target_dir).rglob('*.blg'): | |
csv_path = p.with_suffix('.csv') | |
subprocess.call(f'relog "{p}" -o "{csv_path}" -f CSV') | |
if __name__ == '__main__': | |
parser = argparse.ArgumentParser() | |
parser.add_argument('target_dir', default='.') | |
args = parser.parse_args() | |
main(args) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment