forked from kostya/benchmarks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.rb
executable file
·44 lines (41 loc) · 1.02 KB
/
run.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env ruby
# frozen_string_literal: true
case ARGV[0]
when 'versions'
exec('./versions.rb')
when 'shell'
Dir.chdir('/src')
exec('bash')
when 'brainfuck'
case ARGV[1]
when 'bench'
Dir.chdir('/src/brainfuck')
exec('make run')
when 'mandel'
Dir.chdir('/src/brainfuck')
exec('make run2')
end
when 'base64'
Dir.chdir('/src/base64')
exec('make run')
when 'json'
Dir.chdir('/src/json')
exec('make run')
when 'matmul'
Dir.chdir('/src/matmul')
exec('make run')
when 'primes'
Dir.chdir('/src/primes')
exec('make run')
end
puts <<~USAGE
Usage: run.rb [command]
Commands:
versions Print installed language versions
shell Start the shell
brainfuck bench Build and run Brainfuck bench.b benchmarks
brainfuck mandel Build and run Brainfuck mandel.b benchmarks
base64 Build and run Base64 benchmarks
json Build and run Json benchmarks
matmul Build and run Matmul benchmarks
USAGE