Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
heroku-buildpack-nodejs
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
heroku-buildpack-nodejs
Commits
f11d083b
Commit
f11d083b
authored
Aug 10, 2015
by
Hunter Loftis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test and implementation for performance dynos
parent
e14c33b6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
17 deletions
+29
-17
nodejs.sh
profile/nodejs.sh
+4
-3
run
test/run
+25
-14
No files found.
profile/nodejs.sh
View file @
f11d083b
...
@@ -20,9 +20,10 @@ detect_memory() {
...
@@ -20,9 +20,10 @@ detect_memory() {
local
limit
=
$(
ulimit
-u
)
local
limit
=
$(
ulimit
-u
)
case
$limit
in
case
$limit
in
256
)
echo
"512"
;;
256
)
echo
"512"
;;
# Standard-1X
512
)
echo
"1024"
;;
512
)
echo
"1024"
;;
# Standard-2X
32768
)
echo
"6144"
;;
16384
)
echo
"2560"
;;
# Performance-M
32768
)
echo
"6144"
;;
# Performance-L
*
)
echo
"
$default
"
;;
*
)
echo
"
$default
"
;;
esac
esac
}
}
...
...
test/run
View file @
f11d083b
#!/usr/bin/env bash
#!/usr/bin/env bash
# See README.md for info on running these tests.
# See README.md for info on running these tests.
testBuildWithUserCacheDirectoriesCamel
()
{
cache
=
$(
mktmpdir
)
compile
"cache-directories-camel"
$cache
assertCaptured
"- non/existent (nothing to cache)"
assertEquals
"1"
"
$(
ls
-1
$cache
/node/server |
grep
node_modules |
wc
-l
|
tr
-d
' '
)
"
assertEquals
"1"
"
$(
ls
-1
$cache
/node/client |
grep
node_modules |
wc
-l
|
tr
-d
' '
)
"
assertCapturedSuccess
compile
"cache-directories-camel"
$cache
assertCaptured
"Loading 3 from cacheDirectories"
assertCaptured
"- server/node_modules"
assertCaptured
"- client/node_modules"
assertCaptured
"- non/existent (not cached - skipping)"
assertCapturedSuccess
}
testConcurrency1X
()
{
testConcurrency1X
()
{
LOG_CONCURRENCY
=
true
MEMORY_AVAILABLE
=
512 capture
$(
pwd
)
/profile/nodejs.sh
LOG_CONCURRENCY
=
true
MEMORY_AVAILABLE
=
512 capture
$(
pwd
)
/profile/nodejs.sh
assertCaptured
"Detected 512 MB available memory, 512 MB limit per process (WEB_MEMORY)"
assertCaptured
"Detected 512 MB available memory, 512 MB limit per process (WEB_MEMORY)"
...
@@ -15,6 +32,13 @@ testConcurrency2X() {
...
@@ -15,6 +32,13 @@ testConcurrency2X() {
assertCapturedSuccess
assertCapturedSuccess
}
}
testConcurrencyPerformanceM
()
{
LOG_CONCURRENCY
=
true
MEMORY_AVAILABLE
=
2560 capture
$(
pwd
)
/profile/nodejs.sh
assertCaptured
"Detected 2560 MB available memory, 512 MB limit per process (WEB_MEMORY)"
assertCaptured
"Recommending WEB_CONCURRENCY=5"
assertCapturedSuccess
}
testConcurrencyPX
()
{
testConcurrencyPX
()
{
LOG_CONCURRENCY
=
true
MEMORY_AVAILABLE
=
6144 capture
$(
pwd
)
/profile/nodejs.sh
LOG_CONCURRENCY
=
true
MEMORY_AVAILABLE
=
6144 capture
$(
pwd
)
/profile/nodejs.sh
assertCaptured
"Detected 6144 MB available memory, 512 MB limit per process (WEB_MEMORY)"
assertCaptured
"Detected 6144 MB available memory, 512 MB limit per process (WEB_MEMORY)"
...
@@ -302,22 +326,9 @@ testBuildWithUserCacheDirectories() {
...
@@ -302,22 +326,9 @@ testBuildWithUserCacheDirectories() {
assertCapturedSuccess
assertCapturedSuccess
}
}
testBuildWithUserCacheDirectoriesCamel
()
{
cache
=
$(
mktmpdir
)
compile
"cache-directories-camel"
$cache
assertCaptured
"- non/existent (nothing to cache)"
assertEquals
"1"
"
$(
ls
-1
$cache
/node/server |
grep
node_modules |
wc
-l
|
tr
-d
' '
)
"
assertEquals
"1"
"
$(
ls
-1
$cache
/node/client |
grep
node_modules |
wc
-l
|
tr
-d
' '
)
"
assertCapturedSuccess
compile
"cache-directories-camel"
$cache
assertCaptured
"Loading 3 from cacheDirectories"
assertCaptured
"- server/node_modules"
assertCaptured
"- client/node_modules"
assertCaptured
"- non/existent (not cached - skipping)"
assertCapturedSuccess
}
testUserConfig
()
{
testUserConfig
()
{
compile
"userconfig"
compile
"userconfig"
...
...
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