{"id":22265882,"url":"https://github.com/juliaastrosim/benchmarkplots.jl","last_synced_at":"2025-07-17T15:34:54.910Z","repository":{"id":46053119,"uuid":"360490313","full_name":"JuliaAstroSim/BenchmarkPlots.jl","owner":"JuliaAstroSim","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-01T02:08:00.000Z","size":121,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-01T03:24:24.852Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JuliaAstroSim.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-04-22T11:10:36.000Z","updated_at":"2025-07-01T02:08:04.000Z","dependencies_parsed_at":"2024-12-03T10:17:14.763Z","dependency_job_id":"4c31d344-525a-4eb1-b29c-14bf6c517ed3","html_url":"https://github.com/JuliaAstroSim/BenchmarkPlots.jl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JuliaAstroSim/BenchmarkPlots.jl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaAstroSim%2FBenchmarkPlots.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaAstroSim%2FBenchmarkPlots.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaAstroSim%2FBenchmarkPlots.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaAstroSim%2FBenchmarkPlots.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JuliaAstroSim","download_url":"https://codeload.github.com/JuliaAstroSim/BenchmarkPlots.jl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaAstroSim%2FBenchmarkPlots.jl/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265622783,"owners_count":23800036,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-03T10:17:04.990Z","updated_at":"2025-07-17T15:34:54.890Z","avatar_url":"https://github.com/JuliaAstroSim.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BenchmarkPlots.jl\n\nBenchmark functions with different amount of data and plot in one figure.\n\n[![codecov](https://codecov.io/gh/JuliaAstroSim/BenchmarkPlots.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/JuliaAstroSim/BenchmarkPlots.jl)\n\n## Install\n\nIn `Julia` `REPL`\n```julia\n]add BenchmarkPlots\n```\n\n## Usage\n\n### Basic\n\n```julia\nusing BenchmarkTools, Makie\nfig, df = benchmarkplot(\n    [sum, minimum],\n    rand,\n    [10^i for i in 1:4],\n)\ndisplay(fig)\ndisplay(df)\nMakie.save(\"benchmark_sum_miminum.png\", fig)\n```\n\n![](./doc/figs/benchmark_sum_miminum.png)\n\n### More info\n\n```julia\nhelp?\u003e benchmarkplot\nsearch: benchmarkplot benchmarkplot! BenchmarkPlots benchmark BenchmarkTools\n\n  benchmarkplot(Functions::Array, Names::Array, gen::Union{Function,Array}, NumData::Array; kw...)\n\n  Benchmark multiple Functions using different lengths of data generated by function gen. NumData is an Array or other iteratables. Returns a   \n  Tuple of (fig, df).\n\n  Core Algorithm\n  ≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡\n\n  For each element in NumData:\n\n    1. gen generates data with length corresponded\n\n    2. BenchmarkTools.@benchmark tunes each function in Functions and restore timings in an array\n\n    3. Plot figure\n\n  Keywords\n  ≡≡≡≡≡≡≡≡≡≡\n\n    •  title: figure title. Default is \"Benchmark\"\n\n    •  logscale: If true, plot axes in log10 scale. Default is true.\n\n    •  xlabel: label of x-axis. Default is logscale ? \"log10(N)\" : \"N\"\n\n    •  ylabel: label of y-axis. Default is logscale ? \"log10(Timing [ns])\" : \"Timing [ns]\"\n\n    •  resolution: figure resolution. Default is (1600, 900)\n\n    •  Names: alternative names of testing functions. Default is string.(Functions), which is exactly the same with function names\n\n    •  colors: colors of each benchmark line. Default is nothing, meaning random colors are assigned to lines.\n\n    •  savelog::Bool: If true, save processed data in csv. The name of logging file depends on analysis function\n\n    •  savefolder: set the directory to save logging file\n\n    •  stairplot: If true, plot line in stair style (which is more concrete). Default is true\n\n    •  legend: If tree, add legend to the plot\n\n    •  loadfromfile: Path to the file of benchmark result. If nothing, run a new benchmark.\n\n  Examples\n  ≡≡≡≡≡≡≡≡≡≡\n\n  using BenchmarkPlots, Makie\n  fig, df = benchmarkplot(\n      [sum, minimum],\n      rand,\n      [10^i for i in 1:4],\n  )\n  display(fig)\n  display(df)\n  Makie.save(\"benchmark_sum_miminum.png\", fig)\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliaastrosim%2Fbenchmarkplots.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuliaastrosim%2Fbenchmarkplots.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliaastrosim%2Fbenchmarkplots.jl/lists"}