summaryrefslogtreecommitdiff
path: root/bench_lmx2487.lua
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2021-06-11 11:54:50 -0400
committerEugeniy E. Mikhailov <evgmik@gmail.com>2021-06-11 11:54:50 -0400
commit4c758ec1dad5ea40b78c238f5b8c414483fef55e (patch)
tree50a71ab954ab5f3a899b50d33620c32da7019f29 /bench_lmx2487.lua
parent25b74e20503b5cccb384569bbc5e6b5705dc57f9 (diff)
downloadnodeMCU_rf_source_lmx2487-4c758ec1dad5ea40b78c238f5b8c414483fef55e.tar.gz
nodeMCU_rf_source_lmx2487-4c758ec1dad5ea40b78c238f5b8c414483fef55e.zip
benchmark can send variable arguments into function
Diffstat (limited to 'bench_lmx2487.lua')
-rw-r--r--bench_lmx2487.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/bench_lmx2487.lua b/bench_lmx2487.lua
index 6f13117..65d25fc 100644
--- a/bench_lmx2487.lua
+++ b/bench_lmx2487.lua
@@ -1,7 +1,7 @@
function bench(f, Nrepition, label)
local tSt=tmr.now()
for i = 1, Nrepition do
- f()
+ f(i)
end
local tEnd=tmr.now()
@@ -24,5 +24,6 @@ bench(function() freq2regestersValues(6.834e9) end, 10 , "freq2regestersValues")
-- main time hog
set_lmx2487_board_to_default_state()
-bench(function() FreqToSettings(6.834e9) end, 1, "FreqToSettings")
+bench(function(x) FreqToSettings(6.834e9+x*1.234e7) end, 10, "FreqToSettings")
+bench(function(x) setFreq(6.834e9+x*1.234e7) end, 10, "setFreq")