Giter VIP home page Giter VIP logo

chia-log-analysis's Introduction

Chia Log Analysis

Build Total alerts Language grade: C/C++

Parses through Chia plotter log files and plops all the juicy details into a CSV file!

Build

See below for instructions if you prefer to build the application yourself. Otherwise feel free to simply download the binaries from the latest release.

Build Prerequisites

  • CMake
  • C++ compiler (with support for C++17)

Build Instructions

git clone https://github.com/Pengor/chia-log-analysis.git

cd chia-log-analysis

cmake -E make_directory ./build

cmake -S src -B build

cmake --build build --config Release

Run

Navigate to the location of the built or downloaded binary and run one of the following options.

Guided prompts:

./chia-log-analysis

Command-line arguments:

./chia-log-analysis -i <logfile directory> -o <output filename>

where <logfile directory> is the path to your chia plotter logs and <output filename> is the path to the .csv file you want to save (file extension should be specified by the user).

Note for Windows

If the application does not run you may need to install the Microsoft Visual C++ Redistributable for Visual Studio 2019.

About

What info does it parse?

For each file it parses as much as it can find of the following (I imagine I'm not the only one who's had a plot interrupted):

  • Log filename
  • Temp dir 1
  • Temp dir 2
  • Plot ID
  • Plot size
  • Buffer size
  • Buckets
  • Threads
  • Stripe size
  • Start date
  • Phase 1 duration
  • Phase 1 CPU %
  • Phase 2 duration
  • Phase 2 CPU %
  • Phase 3 duration
  • Phase 3 CPU %
  • Phase 4 duration
  • Phase 4 CPU %
  • Total time (sec)
  • Total time
  • Total CPU %
  • Copy time
  • Plot filename

Why does this exist?

I started doing some chia plotting and wanted to compare the performance of different settings used during plotting. I imagine there are other tools out there that do the same thing as this one, but it gave me an excuse to do some more C++ learning outside my typical ecosystem. If you find any bugs or want to see a feature added please feel free to open a new Issue.

chia-log-analysis's People

Contributors

michaelclarkcuadrado avatar pengor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

chia-log-analysis's Issues

Add cpu percentage

Hey

In log files we have cpu percentage for each phase. It would be very convenient to keep track of cpu usage for each phase.

If you make a log analyzer, then you need to track everything, right?)

Support for multiple plots log files

When plotting using the CLI the -n option controls the number of plots to be created. All of these plots are piped into a single log file. I would be fantastic for the chia-log-analysis to be able to parse and extract the info about all the plots

Attached you can find a couple of logs with multiple plots: 1.log 2.log

Thank you very much!

Time format and additional columns

Hi - Thanks for this great tool.

It would be great to have the times shown in HH:mm and maybe just mm for Phase 4. At the moment, I convert them in the spreadsheet each time,

Also, is there a way to add some additional columns to the table, esp. the log file name? - this would really help with identifying the settings used for that particular job (set up via Swar plot manager).

Cheers.

GCC 8 not supported

When running the last build command on debian 10, version gcc 8.

I get the following error

utente@debian:~/chia-log-analysis$ cmake --build build --config Release [ 25%] Linking CXX executable chia-log-analysis /usr/bin/ld: CMakeFiles/chia-log-analysis.dir/main.cpp.o: in function main':
main.cpp:(.text+0x1ab): undefined reference to std::filesystem::file_size(std::filesystem::__cxx11::path const&)' /usr/bin/ld: main.cpp:(.text+0x434): undefined reference to std::filesystem::__cxx11::directory_iterator::operator*() const'
/usr/bin/ld: main.cpp:(.text+0x14c7): undefined reference to std::filesystem::__cxx11::directory_iterator::operator++()' /usr/bin/ld: CMakeFiles/chia-log-analysis.dir/main.cpp.o: in function std::filesystem::__cxx11::directory_iterator::directory_iterator(std::filesystem::__cxx11::path const&)':
main.cpp:(.text._ZNSt10filesystem7__cxx1118directory_iteratorC2ERKNS0_4pathE[_ZNSt10filesystem7__cxx1118directory_iteratorC5ERKNS0_4pathE]+0x26): undefined reference to std::filesystem::__cxx11::directory_iterator::directory_iterator(std::filesystem::__cxx11::path const&, std::filesystem::directory_options, std::error_code*)' /usr/bin/ld: CMakeFiles/chia-log-analysis.dir/main.cpp.o: in function std::filesystem::__cxx11::path::path<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::filesystem::__cxx11::path>(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::filesystem::__cxx11::path::format)':
main.cpp:(.text._ZNSt10filesystem7__cxx114pathC2INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES1_EERKT_NS1_6formatE[_ZNSt10filesystem7__cxx114pathC5INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES1_EERKT_NS1_6formatE]+0x64): undefined reference to std::filesystem::__cxx11::path::_M_split_cmpts()' /usr/bin/ld: CMakeFiles/chia-log-analysis.dir/InputHandler.cpp.o: in function std::filesystem::is_directory(std::filesystem::__cxx11::path const&)':
InputHandler.cpp:(.text._ZNSt10filesystem12is_directoryERKNS_7__cxx114pathE[_ZNSt10filesystem12is_directoryERKNS_7__cxx114pathE]+0x14): undefined reference to std::filesystem::status(std::filesystem::__cxx11::path const&)' collect2: error: ld returned 1 exit status make[2]: *** [CMakeFiles/chia-log-analysis.dir/build.make:114: chia-log-analysis] Error 1 make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/chia-log-analysis.dir/all] Error 2 make: *** [Makefile:84: all] Error 2

MSVCP140D.dll missing

Note the D after the numbers, the binary is debug version, not release and debug runtime files are not in the regular packages.

Add support for UTF-16 character encoding

This utility is extremely useful - I used to have to manually parse and enter the info into a spreadsheet by hand :((

This works great for logs created by the Chia UI logger. However, I have recently started to plot using the CLI. I pipe the output into a log via Powershell tee command. This produces a similar file BUT one major difference is that it does not have the entire block at the top - it starts with the "Starting plotting progress into temporary dirs: xxx" line onwards. I've attached a sample log file.
_202105312205.log

This causes the utility to just crash out with no output.
Perhaps it would be great if the utility could be modified so it'll skip missing info (treat as blank) and move on to parse the remaining info?

Thanks again for this useful time-saving tool!

Change format of *Start date* data

Due to the default format of the Chia plotter log Start date data it is not easily sortable by spreadsheet applications once Chia Log Analysis has output a CSV file. Chia Log Analysis should interpret the string from the log and output it in a more easily sortable format such as: YYYY-MM-DD hh:mm:ss

Add "Copy time" column to output

Newer plotter log files list a "Copy time" that could be included in the parsing output.

Need to ensure compatibility with older log files that didn't list this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.