summaryrefslogtreecommitdiffstats
path: root/runtime/bench2/run_binary_print
blob: bbd831801381ff9e6c086e17d260393c32c1bcaa (plain)
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
#!/usr/bin/env ruby
load './bench.rb'

# script test with empty probe
test0 = Stapbench.new("empty probe")
test0.code = ""
test0.run
test0.print

# script test to binary print 4 integers
test1 = Stapbench.new("binary printf 4 integers (%8b)")
test1.code = "printf(\"%8b%8b%8b%8b\", 111,22,333,444)"
test1.run
test1.print

# script test to binary print 4 integers
test2 = Stapbench.new("binary printf 4 integers (%4b)")
test2.code = "printf(\"%4b%4b%4b%4b\", 111,22,333,444)"
test2.run
test2.print


# script test to binary print 4 integers
test3 = Stapbench.new("binary printf 4 integers (%b)")
test3.code = "printf(\"%b%b%b%b\", 111,22,333,444)"
test3.run
test3.print
test3.trans = RELAYFS
test3.run
test3.print

# script test to binary print 4 integers
test4 = Stapbench.new("_stp_print_binary 4 integers")
test4.code = "stp_print_binary(4,111,22,333,444)"
test4.run
test4.print
test4.trans = RELAYFS
test4.run
test4.print