Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pyodide
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
pyodide
Commits
9f72505e
Commit
9f72505e
authored
Aug 03, 2018
by
Michael Droettboom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix benchmarks
parent
2d0b9ee2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
benchmark/benchmark.py
benchmark/benchmark.py
+8
-6
tools/buildall
tools/buildall
+0
-1
No files found.
benchmark/benchmark.py
View file @
9f72505e
import
json
import
json
import
os
from
pathlib
import
Path
from
pathlib
import
Path
import
re
import
re
import
subprocess
import
subprocess
import
sys
import
sys
sys
.
path
.
insert
(
0
,
(
Path
(
__file__
).
parent
.
parent
/
'test'
).
resolve
())
sys
.
path
.
insert
(
0
,
str
((
Path
(
__file__
).
resolve
().
parent
.
parent
/
'test'
)))
print
(
sys
.
path
)
import
conftest
import
conftest
...
@@ -16,10 +18,10 @@ SKIP = set(['fft', 'hyantes'])
...
@@ -16,10 +18,10 @@ SKIP = set(['fft', 'hyantes'])
def
run_native
(
hostpython
,
code
):
def
run_native
(
hostpython
,
code
):
output
=
subprocess
.
check_output
(
output
=
subprocess
.
check_output
(
[
hostpython
.
resolve
(),
'-c'
,
code
],
[
hostpython
.
resolve
(),
'-c'
,
code
],
cwd
=
os
.
path
.
dirname
(
__file__
)
,
cwd
=
Path
(
__file__
).
resolve
().
parent
,
env
=
{
env
=
{
'PYTHONPATH'
:
'PYTHONPATH'
:
str
(
(
Path
(
__file__
).
parent
.
parent
/
'src'
).
resolve
()
)
str
(
Path
(
__file__
).
resolve
().
parent
.
parent
/
'src'
)
}
}
)
)
return
float
(
output
.
strip
().
split
()[
-
1
])
return
float
(
output
.
strip
().
split
()[
-
1
])
...
@@ -79,7 +81,7 @@ def get_numpy_benchmarks():
...
@@ -79,7 +81,7 @@ def get_numpy_benchmarks():
name
=
filename
.
name
name
=
filename
.
name
if
name
in
SKIP
:
if
name
in
SKIP
:
continue
continue
content
=
parse_numpy_benchmark
(
root
/
filename
)
content
=
parse_numpy_benchmark
(
filename
)
content
+=
(
content
+=
(
"import numpy as np
\
n
"
"import numpy as np
\
n
"
"_ = np.empty(())
\
n
"
"_ = np.empty(())
\
n
"
...
@@ -105,6 +107,6 @@ def main(hostpython):
...
@@ -105,6 +107,6 @@ def main(hostpython):
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
results
=
main
(
sys
.
argv
[
-
2
]
)
results
=
main
(
Path
(
sys
.
argv
[
-
2
]).
resolve
()
)
with
open
(
sys
.
argv
[
-
1
],
'w'
)
as
fp
:
with
open
(
sys
.
argv
[
-
1
],
'w'
)
as
fp
:
json
.
dump
(
results
,
fp
)
json
.
dump
(
results
,
fp
)
tools/buildall
View file @
9f72505e
...
@@ -35,7 +35,6 @@ def build_packages(packagesdir, outputdir):
...
@@ -35,7 +35,6 @@ def build_packages(packagesdir, outputdir):
# so first load in all of the package metadata and build a dependency map.
# so first load in all of the package metadata and build a dependency map.
dependencies
=
{}
dependencies
=
{}
for
pkgdir
in
packagesdir
.
iterdir
():
for
pkgdir
in
packagesdir
.
iterdir
():
pkgdir
=
packagesdir
/
pkgdir
pkgpath
=
pkgdir
/
'meta.yaml'
pkgpath
=
pkgdir
/
'meta.yaml'
if
pkgdir
.
is_dir
()
and
pkgpath
.
is_file
():
if
pkgdir
.
is_dir
()
and
pkgpath
.
is_file
():
pkg
=
common
.
parse_package
(
pkgpath
)
pkg
=
common
.
parse_package
(
pkgpath
)
...
...
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