Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
ion
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Enzo Cioppettini
ion
Commits
79135c09
Commit
79135c09
authored
5 years ago
by
AdminXVII
Committed by
Michael Aaron Murphy
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Run one process per CPU
parent
c1df8c06
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/run_examples.sh
+6
-3
6 additions, 3 deletions
tests/run_examples.sh
with
6 additions
and
3 deletions
tests/run_examples.sh
+
6
−
3
View file @
79135c09
...
@@ -68,14 +68,17 @@ export TAGFAIL
...
@@ -68,14 +68,17 @@ export TAGFAIL
export
TAGPASS
export
TAGPASS
export
EXAMPLES_DIR
export
EXAMPLES_DIR
# See https://prefetch.net/blog/2017/08/17/using-xargs-and-lscpu-to-spawn-one-process-per-cpu-core/
CPU_CORES
=
$(
lscpu
-p
=
CORE,ONLINE |
grep
-c
'Y'
)
# Build debug binary
# Build debug binary
cargo +
$TOOLCHAIN
build
cargo +
$TOOLCHAIN
build
# Iterate over every Ion script in examples directory
# Iterate over every Ion script in examples directory
ls
-1
$EXAMPLES_DIR
/
*
.ion | xargs
-P
0
-n
1
-I
{}
bash
-c
"check_return_value {}"
ls
-1
$EXAMPLES_DIR
/
*
.ion | xargs
-P
$CPU_CORES
-n
1
-I
{}
bash
-c
"check_return_value {}"
# Iterate over every parameter set
# Iterate over every parameter set
ls
-1
$EXAMPLES_DIR
/
*
.params | xargs
-P
0
-n
1
-I
{}
bash
-c
"test_cli {}"
ls
-1
$EXAMPLES_DIR
/
*
.params | xargs
-P
$CPU_CORES
-n
1
-I
{}
bash
-c
"test_cli {}"
# Build debug binary for testing structopt argument parsing
# Build debug binary for testing structopt argument parsing
cargo +
$TOOLCHAIN
build
--features
=
advanced_arg_parsing
cargo +
$TOOLCHAIN
build
--features
=
advanced_arg_parsing
# Iterate over every parameter set
# Iterate over every parameter set
ls
-1
$EXAMPLES_DIR
/
*
.params | xargs
-P
0
-n
1
-I
{}
bash
-c
"test_cli {}"
ls
-1
$EXAMPLES_DIR
/
*
.params | xargs
-P
$CPU_CORES
-n
1
-I
{}
bash
-c
"test_cli {}"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment