Skip to content

Commit

Permalink
Merge pull request #12 from vext01/big-loop
Browse files Browse the repository at this point in the history
Add BigLoop benchmark.
  • Loading branch information
ptersilie authored Oct 8, 2024
2 parents 58f2ad7 + 1c30455 commit f76c150
Show file tree
Hide file tree
Showing 24 changed files with 69 additions and 3 deletions.
35 changes: 35 additions & 0 deletions LICENSE-yk
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
The yk suite (found in the yk/ directory) is dual license under the Apache 2.0
and MIT licenses.

# The Apache 2.0 license

Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.

# The MIT license

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
22 changes: 19 additions & 3 deletions rebench.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ benchmark_suites:
invocations: 5 # the number of process executions
iterations: 10 # the number of in-process iterations
cores: [ "default" ]
location: awfy/Lua
location: suites/awfy/Lua
benchmarks: &BENCHMARKS
- DeltaBlue:
extra_args: 12000
Expand Down Expand Up @@ -40,6 +40,22 @@ benchmark_suites:
extra_args: 1000
- Towers:
extra_args: 600
# Benchmarks written "in-house".
yk:
gauge_adapter: RebenchLog
# Borrowing the harness from awfy.
command: " ../../awfy/Lua/harness.lua %(benchmark)s %(iterations)s "
max_invocation_time: 600 # seconds per vm invocation
min_iteration_time: 200 # miliseconds per iteration
invocations: 5 # the number of process executions
iterations: 10 # the number of in-process iterations
cores: [ "default" ]
location: suites/yk/Lua
# ensure harness.lua can find its deps
env: {LUA_PATH: "?.lua;../../awfy/Lua/?.lua"}
benchmarks:
- BigLoop:
extra_args: 1000000000

executors:
Lua:
Expand All @@ -51,5 +67,5 @@ executors:

experiments:
yk:
suites: [awfy]
executions: [Lua, YkLua]
suites: [awfy, yk]
executions: [Lua]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
15 changes: 15 additions & 0 deletions suites/yk/Lua/bigloop.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
local bigloop = {} do
setmetatable(bigloop, {__index = require'benchmark'})

function bigloop:inner_benchmark_loop (inner_iterations)
local sum = 0
print(inner_iterations)
for _ = 0, inner_iterations do
sum = sum + 1
end
return sum == inner_iterations + 1
end

end -- object bigloop

return bigloop

0 comments on commit f76c150

Please sign in to comment.