Skip to content

Instantly share code, notes, and snippets.

@tka
Created June 14, 2011 17:25
Show Gist options
  • Select an option

  • Save tka/1025399 to your computer and use it in GitHub Desktop.

Select an option

Save tka/1025399 to your computer and use it in GitHub Desktop.
$ compass create test_project;
$ cd test_projrct;
$ jruby -J-Xmx128m -J-d32 test.rb
memory usage in kilobytes
65496
66360
67316
68224
68496
68996
69224
69744
70096
70436
70608
70744
71256
71272
71616
71728
72748
72828
73104
73212
73268
73376
73404
73556
74124
74552
74804
74876
74844
75016
74984
75020
75056
75196
75248
75296
75372
75420
75488
75616
75676
75772
75732
75816
75980
76032
76040
76184
76276
76496
76648
76616
76756
76824
76860
76904
76900
77008
76980
77120
77132
77184
77296
77352
77388
77456
77416
77468
77524
77652
77696
77656
77716
77872
77924
77972
78016
78076
78124
78244
78296
78348
78420
78480
78536
78596
78644
78620
78692
78820
78808
78936
78952
79012
79072
79068
79192
79236
79300
79284
OSX 10.6
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07-334-10M3326)
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02-334, mixed mode)
jruby 1.6.2
require "rubygems"
require "compass"
require "compass/exec"
def memory_usage
`ps -o rss= -p #{Process.pid}`.to_i
end
dir = '.'
memory_usages=[]
100.times do |x|
Compass::Commands::CleanProject.new(dir, {}).perform
Compass::Commands::UpdateProject.new( dir, {}).perform
memory_usages << memory_usage
end
puts "memory usage in kilobytes"
memory_usages.each do |x|
puts x.to_s
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment