Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions benchmark/Artifacts.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[testdata]
git-tree-sha1 = "d884abbeac09834475c56b256659becc1da64927"
lazy = true

[[testdata.download]]
url = "https://github.com/henry2004y/batsrus_data/raw/master/batsrus_data.tar.gz"
sha256 = "e344560deced105e684ed975276f34d7003427f5337c7e4b1def8274e5470a23"
3 changes: 2 additions & 1 deletion benchmark/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
Batsrus = "e74ebddf-6ac1-4047-a0e5-c32c99e57753"
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
CodecZlib = "944b1d66-785c-5afd-91f1-9de20f533193"
HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"
HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"
LazyArtifacts = "4af54fe1-eca0-43a8-85a7-787d91b784e3"
13 changes: 9 additions & 4 deletions benchmark/benchmarks.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using BenchmarkTools, Downloads, Tar, CodecZlib, HDF5
using BenchmarkTools, Downloads, Tar, CodecZlib, HDF5, LazyArtifacts

t = @elapsed using Batsrus
println("Julia version is $VERSION")
Expand Down Expand Up @@ -93,6 +93,11 @@ SUITE["amrex"]["phase_space_3d"] = @benchmarkable get_phase_space_density(

# Helper for file-based selection benchmark (lazy load)
amrex_data_unloaded = AMReXParticle(amrex_dir)
SUITE["amrex"]["select_region_from_files"] = @benchmarkable select_particles_in_region(
$amrex_data_unloaded, x_range = (2.5, 4.5)
)

SUITE["vtk"] = BenchmarkGroup()
datapath_vtk = artifact"testdata"
filetag_vtk = joinpath(datapath_vtk, "3d_mhd_amr/3d__mhd_1_t00000000_n00000000")
batl_vtk = Batl(readhead(filetag_vtk * ".info"), readtree(filetag_vtk)...)

SUITE["vtk"]["getConnectivity"] = @benchmarkable getConnectivity($batl_vtk)
SUITE["vtk"]["find_grid_block"] = @benchmarkable Batsrus.find_grid_block($batl_vtk, [0.0, 0.0, 0.0])
Loading
Loading