Edited pyproject.toml and project structure
This commit is contained in:
parent
518f7d1bf5
commit
c3827ed4f0
4 changed files with 12 additions and 7 deletions
|
|
@ -0,0 +1 @@
|
|||
from .core import main
|
||||
|
|
@ -10,7 +10,7 @@ import numpy as np
|
|||
import seaborn as sns
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
from arguments import parser
|
||||
from .arguments import parser
|
||||
|
||||
def parse_basename_into_byte_count(basename: str) -> int:
|
||||
ret: int = -1
|
||||
|
|
@ -20,9 +20,9 @@ def parse_basename_into_byte_count(basename: str) -> int:
|
|||
if pat is not None:
|
||||
size = int(pat.group("size"))
|
||||
match pat.group("unit"):
|
||||
case "K": ret = size
|
||||
case "M": ret = size * 1024
|
||||
case "G": ret = size * 1024 * 1024
|
||||
case "K" | "k": ret = size
|
||||
case "M" | "m": ret = size * 1024
|
||||
case "G" | "g": ret = size * 1024 * 1024
|
||||
case _:
|
||||
raise Exception("Unexpected unit \"{}\".".format(pat.group("unit")))
|
||||
|
||||
|
|
@ -72,7 +72,7 @@ def parse_function_graph_ftrace(trace_fpath: str):
|
|||
print("Shape: {}; head: \n{}".format(fngraph_df.shape, fngraph_df.head()))
|
||||
return fngraph_df
|
||||
|
||||
def main(args: Namespace):
|
||||
def run(args: Namespace):
|
||||
# Load dataset -- each should have good 1000 entries
|
||||
ftrace_dat_paths: List[str] = []
|
||||
ftrace_dfs: List[Tuple(int, pd.DataFrame)] = []
|
||||
|
|
@ -113,7 +113,8 @@ def main(args: Namespace):
|
|||
fig.savefig(args.output)
|
||||
plt.show()
|
||||
|
||||
if __name__ == "__main__":
|
||||
def main():
|
||||
args = parser.parse_args()
|
||||
sns.set_theme(context="talk", style="ticks", rc={"axes.grid": True})
|
||||
main(args)
|
||||
run(args)
|
||||
|
||||
Binary file not shown.
|
|
@ -11,7 +11,10 @@ matplotlib = "^3.8.3"
|
|||
seaborn = "^0.13.2"
|
||||
trappy = "^6.0.1"
|
||||
|
||||
[tool.poetry.scripts]
|
||||
ftrace2pyplot = "ftrace2pyplot.core:main"
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue