Commit 68497d00 authored by Ben Gamari's avatar Ben Gamari 🐢

ghc_timings: Simple plotting

parent 7ae9ceaf
......@@ -5,6 +5,7 @@ import re
import sys
import typing
import pandas as pd
from matplotlib import pyplot as pl
from typing import Iterator
class Timing(typing.NamedTuple):
......@@ -26,11 +27,16 @@ def parse_timings(s: str) -> pd.DataFrame:
df = pd.DataFrame(xs, columns=['phase', 'module', 'time', 'allocd'])
df['n'] = df.index
df.sort_values(by=['module', 'n'], inplace=True)
return df.drop(columns='n')
return df # df.drop(columns='n')
def main() -> None:
s =
df = parse_timings(s)
df2 = df.set_index(['module', 'phase', 'n'])['time'].unstack('module')'compile time (ms)', rot=30)
if __name__ == '__main__':
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment