Skip to content

Instantly share code, notes, and snippets.

Nasos Psarrakos nasospsa

  • Tripsta
Block or report user

Report or block nasospsa

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View bench_rails_script_memory_usage.rb
def start_script
puts "starting script..."
# Remove the X to enable the parameters for tuning.
# These are the default values as of Ruby 2.2.0.
@child = spawn(<<-EOC.split.join(" "))
XRUBY_GC_HEAP_FREE_SLOTS=4096
XRUBY_GC_HEAP_INIT_SLOTS=10000
XRUBY_GC_HEAP_GROWTH_FACTOR=1.8
XRUBY_GC_HEAP_GROWTH_MAX_SLOTS=0
XRUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR=2.0
@nasospsa
nasospsa / gist:4612417
Last active Dec 11, 2015
Calculate the value based on percent
View gist:4612417
var randomValues= [33, 56, 29, 67, 96, 58, 72, 88, 92, 61, 19, 100, 47, 96, 93, 16, 68, 9, 6, 41, 9, 95, 69, 89, 68, 22, 52, 28, 48, 76, 80, 35, 29, 18, 60, 95, 5, 46, 98, 55, 94, 70, 36, 94, 97, 38, 23, 98, 58, 61, 93, 55, 30, 86, 92, 74, 64, 48, 70, 69, 27, 2, 76, 52, 27, 100, 1, 23, 86, 3, 66, 63, 59, 35, 77, 75, 93, 76, 58, 32, 15, 51, 17, 67, 99, 83, 79, 67, 76, 71, 3, 31, 79, 25, 5, 66, 14, 7, 96, 48, 65, 93, 67, 9, 52, 92, 24, 73, 47, 78, 21, 48, 26, 58, 34, 55, 12, 25, 3, 62, 60, 40, 67, 73, 100, 94, 89, 96, 35, 85, 29, 13, 61, 83, 52, 75, 30, 83, 90, 60, 67, 21, 2, 54, 52, 48, 45, 26, 80, 100, 30, 6, 85, 81, 13, 84, 22, 14, 16, 98, 7, 34, 99, 86, 57, 10, 17, 98, 59, 33, 17, 4, 80, 93, 73, 92, 12, 17, 94, 1, 97, 37, 67, 35, 15, 13, 13, 82, 21, 5, 92, 52, 46, 57, 55, 34, 98, 47, 30, 93, 11, 34, 68, 28, 89, 73, 34, 79, 96, 7, 50, 98, 44, 4, 15, 89, 39, 47, 89, 86, 8, 34, 33, 19, 57, 73, 22, 70, 92, 72, 26, 21, 88, 53, 33, 29, 48, 1, 7, 75, 50, 99, 70, 86, 40, 57, 71, 21, 55, 89, 89, 3, 36, 67, 30, 44, 2
You can’t perform that action at this time.