Loading .github/workflows/doc.yml +2 −0 Original line number Diff line number Diff line Loading @@ -75,6 +75,7 @@ jobs: uses: ad-m/github-push-action@master with: github_token: ${{ secrets.GITHUB_TOKEN }} branch: ${{ github.ref }} doc: runs-on: ubuntu-latest Loading Loading @@ -130,6 +131,7 @@ jobs: ENV_PROD: 'true' PLANTUML_HOST: http://localhost:18080 run: | git pull git fetch --all --tags git branch -av git remote -v Loading .gitignore +1 −1 Original line number Diff line number Diff line Loading @@ -1205,7 +1205,7 @@ fabric.properties /docs/source/**/*.sh.err /docs/source/**/*.sh.exitcode /docs/source/**/*.dat.* !/docs/source/**/*.bm.* !/docs/source/**/*.benchmark.py.* !/docs/source/_static/**/* /docs/source/**/*.result.ipynb /cartpole_dqn_* Loading docs/Makefile +6 −1 Original line number Diff line number Diff line Loading @@ -11,6 +11,8 @@ BUILDDIR ?= ${PROJ_DIR}/build ALL_MK := ${SOURCEDIR}/all.mk ALL := $(MAKE) -f "${ALL_MK}" SOURCE=${SOURCEDIR} BMS := $(shell find ${SOURCEDIR} -name 'benchmark_*.dat.*') .EXPORT_ALL_VARIABLES: NO_CONTENTS_BUILD = true Loading Loading @@ -42,3 +44,6 @@ sourcedir: @echo $(shell readlink -f ${SOURCEDIR}) builddir: @echo $(shell readlink -f ${BUILDDIR}/html) cleanbm: $(ALL) cleanbm docs/source/_libs/benchmark.py +47 −40 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ import warnings from multiprocessing import Process from typing import Tuple, List import click import matplotlib.pyplot as plt import numpy as np import psutil Loading Loading @@ -93,7 +94,7 @@ class BaseBenchmark: return final_mems, final_times, final_labels def create_plot(items: List[Tuple[str, BaseBenchmark]], save_as: str, def create_plot_cli(items: List[Tuple[str, BaseBenchmark]], title: str = 'Unnamed Benchmark Plot', run_times=15, try_times=10, mem_ylog: bool = False, time_ylog: bool = False, figsize=(720, 420), dpi: int = 300): Loading @@ -113,6 +114,10 @@ def create_plot(items: List[Tuple[str, BaseBenchmark]], save_as: str, else: return f'{x * 1.0:.1f}s' @click.command() @click.option('--output', '-o', 'save_as', type=click.Path(dir_okay=False), required=True, help='Output path of image file.', show_default=True) def _execute(save_as): fig, axes = plt.subplots(1, 2, figsize=(figsize[0] / INCHES_TO_PIXELS, figsize[1] / INCHES_TO_PIXELS)) if mem_ylog: Loading Loading @@ -149,3 +154,5 @@ def create_plot(items: List[Tuple[str, BaseBenchmark]], save_as: str, fig.tight_layout() plt.savefig(save_as, bbox_inches='tight', dpi=dpi, transparent=True) return _execute docs/source/all.mk +2 −0 Original line number Diff line number Diff line Loading @@ -45,3 +45,5 @@ clean: @$(DEMOS) clean @$(NOTEBOOK) clean cleanbm: @$(DEMOS) cleanbm Loading
.github/workflows/doc.yml +2 −0 Original line number Diff line number Diff line Loading @@ -75,6 +75,7 @@ jobs: uses: ad-m/github-push-action@master with: github_token: ${{ secrets.GITHUB_TOKEN }} branch: ${{ github.ref }} doc: runs-on: ubuntu-latest Loading Loading @@ -130,6 +131,7 @@ jobs: ENV_PROD: 'true' PLANTUML_HOST: http://localhost:18080 run: | git pull git fetch --all --tags git branch -av git remote -v Loading
.gitignore +1 −1 Original line number Diff line number Diff line Loading @@ -1205,7 +1205,7 @@ fabric.properties /docs/source/**/*.sh.err /docs/source/**/*.sh.exitcode /docs/source/**/*.dat.* !/docs/source/**/*.bm.* !/docs/source/**/*.benchmark.py.* !/docs/source/_static/**/* /docs/source/**/*.result.ipynb /cartpole_dqn_* Loading
docs/Makefile +6 −1 Original line number Diff line number Diff line Loading @@ -11,6 +11,8 @@ BUILDDIR ?= ${PROJ_DIR}/build ALL_MK := ${SOURCEDIR}/all.mk ALL := $(MAKE) -f "${ALL_MK}" SOURCE=${SOURCEDIR} BMS := $(shell find ${SOURCEDIR} -name 'benchmark_*.dat.*') .EXPORT_ALL_VARIABLES: NO_CONTENTS_BUILD = true Loading Loading @@ -42,3 +44,6 @@ sourcedir: @echo $(shell readlink -f ${SOURCEDIR}) builddir: @echo $(shell readlink -f ${BUILDDIR}/html) cleanbm: $(ALL) cleanbm
docs/source/_libs/benchmark.py +47 −40 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ import warnings from multiprocessing import Process from typing import Tuple, List import click import matplotlib.pyplot as plt import numpy as np import psutil Loading Loading @@ -93,7 +94,7 @@ class BaseBenchmark: return final_mems, final_times, final_labels def create_plot(items: List[Tuple[str, BaseBenchmark]], save_as: str, def create_plot_cli(items: List[Tuple[str, BaseBenchmark]], title: str = 'Unnamed Benchmark Plot', run_times=15, try_times=10, mem_ylog: bool = False, time_ylog: bool = False, figsize=(720, 420), dpi: int = 300): Loading @@ -113,6 +114,10 @@ def create_plot(items: List[Tuple[str, BaseBenchmark]], save_as: str, else: return f'{x * 1.0:.1f}s' @click.command() @click.option('--output', '-o', 'save_as', type=click.Path(dir_okay=False), required=True, help='Output path of image file.', show_default=True) def _execute(save_as): fig, axes = plt.subplots(1, 2, figsize=(figsize[0] / INCHES_TO_PIXELS, figsize[1] / INCHES_TO_PIXELS)) if mem_ylog: Loading Loading @@ -149,3 +154,5 @@ def create_plot(items: List[Tuple[str, BaseBenchmark]], save_as: str, fig.tight_layout() plt.savefig(save_as, bbox_inches='tight', dpi=dpi, transparent=True) return _execute
docs/source/all.mk +2 −0 Original line number Diff line number Diff line Loading @@ -45,3 +45,5 @@ clean: @$(DEMOS) clean @$(NOTEBOOK) clean cleanbm: @$(DEMOS) cleanbm