Moddable Instrumentation Parser is a Python script designed to parse log files generated by Moddable instrumentation and organize the extracted data into separate CSV files for a "worker" and "controller" virtual machine.
The CSV files are the input files for the Grafana to generate dashboards for the instrumentation data analysis, such as CPU usage, chunks, slots, stack, etc.
This script processes log files containing instrumented data from Moddable and extracts relevant information related to "instruments." It categorizes the data into two components: "worker" and "controller." The parsed information is then written to separate CSV files for further analysis.
-
Clone the repository:
git clone https://github.com/costa-victor/moddable-instrumentation-parser.git
-
Navigate to the repository:
cd moddable-instrumentation-parser -
Update the input file path and output file paths in the script (
log_processor.py) according to your requirements. -
Install Grafana
-
Install Grafana CSV plugin
-
Install moreutils
-
Import the Grafana example dashboard: Moddable instrumentation analysis.json
-
Run the following command in the terminal to generate the logs to be consumed by the script:
mcconfig -i -m -p esp32/nodemcu | ts %s >> your-log.log
-
In a second terminal, run the script:
python log_processor.py
This will process the log file, extract relevant information, and write the results to CSV files.
- Python 3
- Grafana
- Grafana CSV - Plugin
- moreutils
- Victor Alberti Costa
This project is licensed under the MIT License - see the LICENSE file for details.
