diff --git a/LICENSE-yk b/LICENSE-yk new file mode 100644 index 0000000..3b34338 --- /dev/null +++ b/LICENSE-yk @@ -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. diff --git a/rebench.conf b/rebench.conf index c02f472..85b2f86 100644 --- a/rebench.conf +++ b/rebench.conf @@ -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 @@ -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: @@ -51,5 +67,5 @@ executors: experiments: yk: - suites: [awfy] - executions: [Lua, YkLua] + suites: [awfy, yk] + executions: [Lua] diff --git a/awfy/Lua/benchmark.lua b/suites/awfy/Lua/benchmark.lua similarity index 100% rename from awfy/Lua/benchmark.lua rename to suites/awfy/Lua/benchmark.lua diff --git a/awfy/Lua/bounce.lua b/suites/awfy/Lua/bounce.lua similarity index 100% rename from awfy/Lua/bounce.lua rename to suites/awfy/Lua/bounce.lua diff --git a/awfy/Lua/cd.lua b/suites/awfy/Lua/cd.lua similarity index 100% rename from awfy/Lua/cd.lua rename to suites/awfy/Lua/cd.lua diff --git a/awfy/Lua/deltablue.lua b/suites/awfy/Lua/deltablue.lua similarity index 100% rename from awfy/Lua/deltablue.lua rename to suites/awfy/Lua/deltablue.lua diff --git a/awfy/Lua/harness.lua b/suites/awfy/Lua/harness.lua similarity index 100% rename from awfy/Lua/harness.lua rename to suites/awfy/Lua/harness.lua diff --git a/awfy/Lua/hashindextable-53.lua b/suites/awfy/Lua/hashindextable-53.lua similarity index 100% rename from awfy/Lua/hashindextable-53.lua rename to suites/awfy/Lua/hashindextable-53.lua diff --git a/awfy/Lua/hashindextable.lua b/suites/awfy/Lua/hashindextable.lua similarity index 100% rename from awfy/Lua/hashindextable.lua rename to suites/awfy/Lua/hashindextable.lua diff --git a/awfy/Lua/havlak.lua b/suites/awfy/Lua/havlak.lua similarity index 100% rename from awfy/Lua/havlak.lua rename to suites/awfy/Lua/havlak.lua diff --git a/awfy/Lua/json.lua b/suites/awfy/Lua/json.lua similarity index 100% rename from awfy/Lua/json.lua rename to suites/awfy/Lua/json.lua diff --git a/awfy/Lua/list.lua b/suites/awfy/Lua/list.lua similarity index 100% rename from awfy/Lua/list.lua rename to suites/awfy/Lua/list.lua diff --git a/awfy/Lua/mandelbrot-fn-53.lua b/suites/awfy/Lua/mandelbrot-fn-53.lua similarity index 100% rename from awfy/Lua/mandelbrot-fn-53.lua rename to suites/awfy/Lua/mandelbrot-fn-53.lua diff --git a/awfy/Lua/mandelbrot-fn.lua b/suites/awfy/Lua/mandelbrot-fn.lua similarity index 100% rename from awfy/Lua/mandelbrot-fn.lua rename to suites/awfy/Lua/mandelbrot-fn.lua diff --git a/awfy/Lua/mandelbrot.lua b/suites/awfy/Lua/mandelbrot.lua similarity index 100% rename from awfy/Lua/mandelbrot.lua rename to suites/awfy/Lua/mandelbrot.lua diff --git a/awfy/Lua/nbody.lua b/suites/awfy/Lua/nbody.lua similarity index 100% rename from awfy/Lua/nbody.lua rename to suites/awfy/Lua/nbody.lua diff --git a/awfy/Lua/permute.lua b/suites/awfy/Lua/permute.lua similarity index 100% rename from awfy/Lua/permute.lua rename to suites/awfy/Lua/permute.lua diff --git a/awfy/Lua/queens.lua b/suites/awfy/Lua/queens.lua similarity index 100% rename from awfy/Lua/queens.lua rename to suites/awfy/Lua/queens.lua diff --git a/awfy/Lua/richards.lua b/suites/awfy/Lua/richards.lua similarity index 100% rename from awfy/Lua/richards.lua rename to suites/awfy/Lua/richards.lua diff --git a/awfy/Lua/sieve.lua b/suites/awfy/Lua/sieve.lua similarity index 100% rename from awfy/Lua/sieve.lua rename to suites/awfy/Lua/sieve.lua diff --git a/awfy/Lua/som.lua b/suites/awfy/Lua/som.lua similarity index 100% rename from awfy/Lua/som.lua rename to suites/awfy/Lua/som.lua diff --git a/awfy/Lua/storage.lua b/suites/awfy/Lua/storage.lua similarity index 100% rename from awfy/Lua/storage.lua rename to suites/awfy/Lua/storage.lua diff --git a/awfy/Lua/towers.lua b/suites/awfy/Lua/towers.lua similarity index 100% rename from awfy/Lua/towers.lua rename to suites/awfy/Lua/towers.lua diff --git a/suites/yk/Lua/bigloop.lua b/suites/yk/Lua/bigloop.lua new file mode 100644 index 0000000..da2962c --- /dev/null +++ b/suites/yk/Lua/bigloop.lua @@ -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