From f82d8485a03fbe9b84143ac2029320da26597769 Mon Sep 17 00:00:00 2001 From: Katharine Hyatt <67932820+kshyatt-aws@users.noreply.github.com> Date: Mon, 29 Apr 2024 15:21:43 -0400 Subject: [PATCH] fix: Exclude precompilation from coverage (#6) --- ext/BraketSimulatorPythonExt/precompile.jl | 3 +++ src/precompile.jl | 3 +++ 2 files changed, 6 insertions(+) diff --git a/ext/BraketSimulatorPythonExt/precompile.jl b/ext/BraketSimulatorPythonExt/precompile.jl index ab7cf66..4e737d7 100644 --- a/ext/BraketSimulatorPythonExt/precompile.jl +++ b/ext/BraketSimulatorPythonExt/precompile.jl @@ -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 @@ -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 diff --git a/src/precompile.jl b/src/precompile.jl index 6ec0bf5..2a615fe 100644 --- a/src/precompile.jl +++ b/src/precompile.jl @@ -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 @@ -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