Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
ef9c6879
Unverified
Commit
ef9c6879
authored
Aug 05, 2020
by
Yukihiro "Matz" Matsumoto
Committed by
GitHub
Aug 05, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5058 from dearblue/benchmark
Improve `rake benchmark`
parents
cfb799a1
fde95a7d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
tasks/benchmark.rake
tasks/benchmark.rake
+3
-3
No files found.
tasks/benchmark.rake
View file @
ef9c6879
...
...
@@ -5,7 +5,7 @@ end
$dat_files
=
[]
def
bm_files
Dir
.
glob
(
"
#{
MRUBY_ROOT
}
/benchmark/bm_*.rb"
)
Dir
.
glob
(
"
#{
MRUBY_ROOT
}
/benchmark/bm_*.rb"
)
.
sort
end
def
build_config_name
...
...
@@ -67,8 +67,8 @@ MRuby.each_target do |target|
puts
"..."
data
=
(
0
...
MRuby
::
BENCHMARK_REPEAT
).
map
do
|
n
|
str
=
%x{(time -
f "%e %S %U"
#{
mruby_bin
}
#{
bm_file
}
) 2>&1 >/dev/null}
str
.
s
plit
(
' '
).
map
(
&
:to_f
)
str
=
%x{(time -
p
#{
mruby_bin
}
#{
bm_file
}
) 2>&1 >/dev/null}
str
.
s
can
(
/\d+\.\d+$/
).
map
(
&
:to_f
)
# [real, user, sys]
end
File
.
open
(
task
.
name
,
"w"
)
do
|
f
|
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment