Skip to content

Commit

Permalink
fix: Exclude precompilation from coverage (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
kshyatt-aws authored Apr 29, 2024
1 parent f8a580e commit f82d848
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ext/BraketSimulatorPythonExt/precompile.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# exclude precompilation from coverage
# COV_EXCL_START
function _precompile_()
ccall(:jl_generating_output, Cint, ()) == 1 || return nothing
Base.precompile(Tuple{typeof(jl_convert_sim_hadamard),Type{Instruction},Py}) # time: 4.069578
Expand Down Expand Up @@ -110,3 +112,4 @@ function _precompile_()
Base.precompile(Tuple{Type{Py},TwoQubitDephasing,Vector{Int64}}) # time: 0.001219169
isdefined(BraketSimulatorPythonExt, Symbol("#201#204")) && Base.precompile(Tuple{getfield(BraketSimulatorPythonExt, Symbol("#201#204")),Vector{Vector{Float64}}}) # time: 0.001131461
end
# COV_EXCL_STOP
3 changes: 3 additions & 0 deletions src/precompile.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# exclude precompilation from coverage
# COV_EXCL_START
function _precompile_()
ccall(:jl_generating_output, Cint, ()) == 1 || return nothing
Base.precompile(Tuple{typeof(apply_observables!),StateVectorSimulator{ComplexF64, Vector{ComplexF64}},Vector{Tuple{HermitianObservable, Vector{Int64}}}}) # time: 2.3760564
Expand Down Expand Up @@ -270,3 +272,4 @@ function _precompile_()
Base.precompile(Tuple{Type{DensityMatrixSimulator},Int64,Int64}) # time: 0.001066707
Base.precompile(Tuple{typeof(evolve!),DensityMatrixSimulator{ComplexF64, Matrix{ComplexF64}},Vector{Instruction{XX}}}) # time: 0.001022039
end
# COV_EXCL_STOP

0 comments on commit f82d848

Please sign in to comment.