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
caa82e71
Commit
caa82e71
authored
Aug 10, 2015
by
Hunter Loftis
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #257 from heroku/performance-m-dynos
test and implementation for performance m dynos
parents
e14c33b6
d6cea494
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
17 deletions
+33
-17
CHANGELOG.md
CHANGELOG.md
+4
-0
nodejs.sh
profile/nodejs.sh
+4
-3
run
test/run
+25
-14
No files found.
CHANGELOG.md
View file @
caa82e71
# Node.js Buildpack Changelog
## Upcoming
Supports WEB_CONCURRENCY for Performance-M dynos
## v78 (2015-07-24)
Defaults node environment to 'production'; bugfixes
...
...
profile/nodejs.sh
View file @
caa82e71
...
...
@@ -20,9 +20,10 @@ detect_memory() {
local
limit
=
$(
ulimit
-u
)
case
$limit
in
256
)
echo
"512"
;;
512
)
echo
"1024"
;;
32768
)
echo
"6144"
;;
256
)
echo
"512"
;;
# Standard-1X
512
)
echo
"1024"
;;
# Standard-2X
16384
)
echo
"2560"
;;
# Performance-M
32768
)
echo
"6144"
;;
# Performance-L
*
)
echo
"
$default
"
;;
esac
}
...
...
test/run
View file @
caa82e71
#!/usr/bin/env bash
# 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
()
{
LOG_CONCURRENCY
=
true
MEMORY_AVAILABLE
=
512 capture
$(
pwd
)
/profile/nodejs.sh
assertCaptured
"Detected 512 MB available memory, 512 MB limit per process (WEB_MEMORY)"
...
...
@@ -15,6 +32,13 @@ testConcurrency2X() {
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
()
{
LOG_CONCURRENCY
=
true
MEMORY_AVAILABLE
=
6144 capture
$(
pwd
)
/profile/nodejs.sh
assertCaptured
"Detected 6144 MB available memory, 512 MB limit per process (WEB_MEMORY)"
...
...
@@ -302,22 +326,9 @@ testBuildWithUserCacheDirectories() {
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
()
{
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