Exemplo n.º 1
0
def main(data: pathlib.Path,
         output: pathlib.Path,
         style: str = "classic",
         ftree: str = None,
         context: str = None,
         degree: int = 0,
         xpair: bool = False,
         functions: List[str] = list(),
         notime: bool = False):
    """
    Args:
        data: Path to json log dump.
        output: Output graph folder.
        style: Set style of output graph.
        functions: Only show specific functions in graph. (eg "[frontend, add]")
        degree: Minimal node degree filter.
        context: Filter on context id.
        ftree: Only show functions that are connected with the given function.
        notime: Hide rpcIn and rpcOut times.
        xpair: Show separate xpairs in individual nodes.
    """
    if output.suffix != ".png":
        output = output / data.stem
        output.mkdir(parents=True, exist_ok=True)

    data = bf.load_logs(data)
    graph_filters = {
        "function_tree": ftree,
        "functions_only": functions,
        "context_id": context,
        "min_degree": degree,
        "xpair": xpair,
        "show_time": not notime,
    }
    analyze_tree(data, output, style, graph_filters)
Exemplo n.º 2
0
def main(logpath: pathlib.Path, output: pathlib.Path):
    output = output / logpath.name
    output.mkdir(exist_ok=True, parents=True)

    platform_logs = {f.stem.split("_")[-1]: bf.load_logs(f) for f in logpath.glob("*.json")}

    plot_platform_comparison(platform_logs, output)
Exemplo n.º 3
0
def main(input_data: pathlib.Path, plot_dir: pathlib.Path):
    plot_dir = plot_dir / input_data.stem
    plot_dir.mkdir(exist_ok=True, parents=True)

    data = bf.load_logs(input_data)

    plot_function_coldstarts(data, plot_dir)
Exemplo n.º 4
0
def main(input_data: pathlib.Path, plot_dir: pathlib.Path):
    # plot_dir = plot_dir / input_data.stem
    plot_dir.mkdir(exist_ok=True, parents=True)

    data = bf.load_logs(input_data)

    plot_function_execution_time(data, plot_dir)
    plot_function_execution_time_frontend(data, plot_dir)
    plot_platform_transport_times(data, plot_dir)
Exemplo n.º 5
0
def main(logdump: pathlib.Path):
    """Print the function tree.

    Args:
        logdump: Path to log json dump.
    """

    data = bf.load_logs(logdump)

    print_function_tree(data)