Skip to content

Zetos11/PerfettoTraceScript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 

Repository files navigation

Perfetto Trace Script

Can be used to extract specific data from a perfetto trace file.

The script uses the perfetto python API to extract the data from the trace.

So far the metrics tracked are :

  • Power rails data
  • Average frequency for the little CPU group
  • Average frequency for the medium CPU group (big in the trace)
  • Average frequency for the big CPU group (bigger in the trace)
  • Frequency of the first GPU
  • Frequency of the second GPU
  • Average GPU memory frequency
  • Battery discharge total
  • Battery discharge rate
  • Total Data WIFI IN/OUT
  • Average SOC temperature
  • Difference SOC temperature
  • Battery percent

Supported traces format are :

  • perfetto-trace
  • proto

The default input directory is './in', the default CSV output is './out/out.csv' and the default slice is [0:100]

Usage :

Default usage example

cd Script
python3 main.py       

Usage example with options

cd Script
python3 main.py --in ./my_input_dir --out ./my_output.csv --slice [25:75]   

Options :

--in : Can be used to specify the input director from where traces will be loaded for analysis

--out : Can be used to specify a CSV for the results. If the CSV cannot be found, it will be created.

WARNING The CSV you used will be EMPTIED at the beginning of the analysis

--slice : Can be used to specify the range of the trace to analyze FOR THE POWER RAILS ONLY. No matter what the slice given is, other traced metrics will be for the entire trace.

The slice format is as follows

[x:y]

Where x is the start of the slice and y is the end of the slice. With x and y being integers and 0 <= x < y <= 100.

References :

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages