Skip to content

Commit 6196ea2

Browse files
committed
bench: idem for other nonlin estimators
1 parent d17cb3f commit 6196ea2

File tree

1 file changed

+42
-5
lines changed

1 file changed

+42
-5
lines changed

benchmark/benchmarks.jl

Lines changed: 42 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ SUITE["SimModel"]["allocation"]["NonLinModel_linearize!"] = @benchmarkable(
5353
## ================== StateEstimator benchmarks =====================================
5454
## ==================================================================================
5555
skf = SteadyKalmanFilter(linmodel)
56-
5756
SUITE["StateEstimator"]["allocation"] = BenchmarkGroup(["allocation"])
5857
SUITE["StateEstimator"]["allocation"]["SteadyKalmanFilter_preparestate!"] = @benchmarkable(
5958
preparestate!($skf, $y, $d),
@@ -71,7 +70,6 @@ SUITE["StateEstimator"]["allocation"]["SteadyKalmanFilter_evaloutput"] = @benchm
7170
)
7271

7372
kf = KalmanFilter(linmodel, nint_u=[1, 1], direct=false)
74-
7573
SUITE["StateEstimator"]["allocation"]["KalmanFilter_preparestate!"] = @benchmarkable(
7674
preparestate!($kf, $y, $d),
7775
samples=1
@@ -81,8 +79,47 @@ SUITE["StateEstimator"]["allocation"]["KalmanFilter_updatestate!"] = @benchmarka
8179
setup=preparestate!($kf, $y, $d),
8280
samples=1
8381
)
84-
SUITE["StateEstimator"]["allocation"]["KalmanFilter_evaloutput"] = @benchmarkable(
85-
evaloutput($kf, $d),
86-
setup=preparestate!($kf, $y, $d),
82+
83+
lo = Luenberger(linmodel, nint_u=[1, 1])
84+
SUITE["StateEstimator"]["allocation"]["Luenberger_preparestate!"] = @benchmarkable(
85+
preparestate!($lo, $y, $d),
86+
samples=1
87+
)
88+
SUITE["StateEstimator"]["allocation"]["Luenberger_updatestate!"] = @benchmarkable(
89+
updatestate!($lo, $u, $y, $d),
90+
setup=preparestate!($lo, $y, $d),
91+
samples=1
92+
)
93+
94+
im = InternalModel(nonlinmodel)
95+
SUITE["StateEstimator"]["allocation"]["InternalModel_preparestate!"] = @benchmarkable(
96+
preparestate!($im, $y, $d),
97+
samples=1
98+
)
99+
SUITE["StateEstimator"]["allocation"]["InternalModel_updatestate!"] = @benchmarkable(
100+
updatestate!($im, $u, $y, $d),
101+
setup=preparestate!($im, $y, $d),
102+
samples=1
103+
)
104+
105+
ukf = UnscentedKalmanFilter(nonlinmodel)
106+
SUITE["StateEstimator"]["allocation"]["UnscentedKalmanFilter_preparestate!"] = @benchmarkable(
107+
preparestate!($ukf, $y, $d),
108+
samples=1
109+
)
110+
SUITE["StateEstimator"]["allocation"]["UnscentedKalmanFilter_updatestate!"] = @benchmarkable(
111+
updatestate!($ukf, $u, $y, $d),
112+
setup=preparestate!($ukf, $y, $d),
113+
samples=1
114+
)
115+
116+
ekf = ExtendedKalmanFilter(linmodel, nint_u=[1, 1], direct=false)
117+
SUITE["StateEstimator"]["allocation"]["ExtendedKalmanFilter_preparestate!"] = @benchmarkable(
118+
preparestate!($ekf, $y, $d),
119+
samples=1
120+
)
121+
SUITE["StateEstimator"]["allocation"]["ExtendedKalmanFilter_updatestate!"] = @benchmarkable(
122+
updatestate!($ekf, $u, $y, $d),
123+
setup=preparestate!($ekf, $y, $d),
87124
samples=1
88125
)

0 commit comments

Comments
 (0)