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 seaborn as sns
|
||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
|
|
||||||
from arguments import parser
|
from .arguments import parser
|
||||||
|
|
||||||
def parse_basename_into_byte_count(basename: str) -> int:
|
def parse_basename_into_byte_count(basename: str) -> int:
|
||||||
ret: int = -1
|
ret: int = -1
|
||||||
|
|
@ -20,9 +20,9 @@ def parse_basename_into_byte_count(basename: str) -> int:
|
||||||
if pat is not None:
|
if pat is not None:
|
||||||
size = int(pat.group("size"))
|
size = int(pat.group("size"))
|
||||||
match pat.group("unit"):
|
match pat.group("unit"):
|
||||||
case "K": ret = size
|
case "K" | "k": ret = size
|
||||||
case "M": ret = size * 1024
|
case "M" | "m": ret = size * 1024
|
||||||
case "G": ret = size * 1024 * 1024
|
case "G" | "g": ret = size * 1024 * 1024
|
||||||
case _:
|
case _:
|
||||||
raise Exception("Unexpected unit \"{}\".".format(pat.group("unit")))
|
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()))
|
print("Shape: {}; head: \n{}".format(fngraph_df.shape, fngraph_df.head()))
|
||||||
return fngraph_df
|
return fngraph_df
|
||||||
|
|
||||||
def main(args: Namespace):
|
def run(args: Namespace):
|
||||||
# Load dataset -- each should have good 1000 entries
|
# Load dataset -- each should have good 1000 entries
|
||||||
ftrace_dat_paths: List[str] = []
|
ftrace_dat_paths: List[str] = []
|
||||||
ftrace_dfs: List[Tuple(int, pd.DataFrame)] = []
|
ftrace_dfs: List[Tuple(int, pd.DataFrame)] = []
|
||||||
|
|
@ -113,7 +113,8 @@ def main(args: Namespace):
|
||||||
fig.savefig(args.output)
|
fig.savefig(args.output)
|
||||||
plt.show()
|
plt.show()
|
||||||
|
|
||||||
if __name__ == "__main__":
|
def main():
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
sns.set_theme(context="talk", style="ticks", rc={"axes.grid": True})
|
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"
|
seaborn = "^0.13.2"
|
||||||
trappy = "^6.0.1"
|
trappy = "^6.0.1"
|
||||||
|
|
||||||
|
[tool.poetry.scripts]
|
||||||
|
ftrace2pyplot = "ftrace2pyplot.core:main"
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["poetry-core"]
|
requires = ["poetry-core"]
|
||||||
build-backend = "poetry.core.masonry.api"
|
build-backend = "poetry.core.masonry.api"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue