Skip to content

Commit 500ad10

Browse files
committed
Deployment: Add support for setting virtual box cpu count
1 parent 436fbcf commit 500ad10

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,19 @@ or chat with us on [Freenode](https://freenode.net/faq.shtml#whatwhy) at `#teche
2121

2222
[Setup a development environment](deployment), typically by using a
2323
remote server dedicated to this project or by using a virtual machine.
24+
Here's a short example:
25+
26+
```
27+
# Clone the project, then move into the right directory
28+
$ cd ~/FrameworkBenchmarks/deployment/vagrant-development
29+
# Turn on the VM. Takes at least 20 minutes
30+
$ vagrant up
31+
# Enter the VM, then run a test
32+
$ vagrant ssh
33+
vagrant@TFB-all:~$ cd ~/FrameworkBenchmarks
34+
vagrant@TFB-all:~/FrameworkBenchmarks$ toolset/run-tests.py --install server --mode verify --test beego
35+
```
36+
2437
Then enable Travis-CI on your project fork, so that any commits you send
2538
to Github are automatically verified for correctness (e.g. meeting all
2639
[benchmark requirements](http://www.techempower.com/benchmarks/#section=code)).
@@ -127,7 +140,7 @@ toolset/run-tests.py --install server --verbose --install-only
127140
You can easily list all available tests
128141

129142
```
130-
╰─$ toolset/run-tests.py --list-tests
143+
$ toolset/run-tests.py --list-tests
131144
activeweb
132145
activeweb-raw
133146
aspnet

deployment/vagrant-common/core.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,8 @@ def provider_virtualbox(config, role)
9090
vb.gui = true
9191
end
9292

93-
if ENV.fetch('TFB_VB_MEM', 2048)
94-
vb.customize ["modifyvm", :id, "--memory", "2048"]
95-
end
93+
vb.memory = ENV.fetch('TFB_VB_MEM', 2048)
94+
vb.cpus = ENV.fetch('TFB_VB_CPU', 2)
9695

9796
override.vm.synced_folder "../..", "/FrameworkBenchmarks"
9897

deployment/vagrant-virtualbox/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ that modify how TFB launches your Virtuabox virtual machines.
99
| `TFB_VB_SHOW` | `true,false` | Show the VM in a window when running? Default is false
1010
| `TFB_VB_ARCH` | `64,32` | Used to force TFB to run a 32-bit virtual machine. This is unsupported, as many of the framework binaries we download are 64-bit only and will not launch. If you cannot run a 64-bit VM, then we recommend using the Amazon AWS provider instead of using this variable
1111
| `TFB_VB_MEM` | `<number>` e.g. `2048` | Size of VM's RAM in MB. Default is `2048`
12-
12+
| `TFB_VB_CPU` | `<number>` e.g. `2` | Number of host CPUs that the VM can access

0 commit comments

Comments
 (0)