cache 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -1,13 +1,16 @@
1
1
  # cache
2
2
 
3
+ Wraps memcached, redis, memcache-client, dalli and handles their weirdnesses, including forking.
4
+
3
5
  A unified cache handling interface, inspired by libraries like [ActiveSupport::Cache::Store](http://api.rubyonrails.org/classes/ActiveSupport/Cache/Store.html), Perl's [Cache::Cache](http://cpan.uwinnipeg.ca/module/Cache::Cache), and [CHI](http://cpan.uwinnipeg.ca/module/CHI).
4
6
 
5
7
  ## Quick example
6
8
 
7
- require 'memcached' # a really fast memcached client gem
9
+ require 'memcached' # a really fast memcached client gem by Evan Weaver, one of the lead engineers at Twitter
8
10
  require 'cache' # this gem, which wraps the client to provide a standard interface
9
- raw_client = Memcached.new('127.0.0.1:11211')
10
- @cache = Cache.wrap(raw_client)
11
+
12
+ client = Memcached.new('127.0.0.1:11211', :binary_protocol => true)
13
+ @cache = Cache.wrap(client)
11
14
 
12
15
  # don't worry, even though it's memcached gem, this won't raise Memcached::NotFound
13
16
  @cache.get('hello')
@@ -15,12 +18,14 @@ A unified cache handling interface, inspired by libraries like [ActiveSupport::C
15
18
  # fetch is not provided by the memcached gem, the wrapper adds it
16
19
  @cache.fetch('hello') { 'world' }
17
20
 
18
- # don't worry, the wrapper will automatically clone the Memcached object after forking
21
+ # don't worry, the wrapper will automatically clone the Memcached object after forking (or threading for that matter)
19
22
  Kernel.fork { @cache.get('hello') }
20
23
 
24
+ If you can't use the memcached gem (because you're on heroku, for example) then just wrap a dalli or a redis client. You still get exactly the same interface.
25
+
21
26
  ## Rationale
22
27
 
23
- I wanted a common interface to a bunch of great Ruby cache clients so I can develop gems (lock_method, cache_method) that accept any of them.
28
+ I wanted a common interface to a bunch of great Ruby cache clients so I can develop gems ([lock_method](https://github.com/seamusabshere/lock_method), [cache_method](https://github.com/seamusabshere/cache_method)) that accept any of them.
24
29
 
25
30
  * I'm tired of rescuing from Memcached::NotFound
26
31
  * I'm tired of forgetting whether it's :expires_in or :ttl
@@ -29,6 +34,39 @@ I wanted a common interface to a bunch of great Ruby cache clients so I can deve
29
34
  * I don't know why Memcached::Rails isn't implemented as an ActiveRecord::Cache::Store (Dalli did it just fine!)
30
35
  * Why are you asking me about :raw or whatever? Just marshal it
31
36
 
37
+ ## Real world usage
38
+
39
+ In production use at [carbon.brighterplanet.com](http://carbon.brighterplanet.com), the Brighter Planet emission estimate web service.
40
+
41
+ ## Speed
42
+
43
+ It's about 50% slower than raw Memcached (if that's what you're wrapping) and barely slower at all than Dalli (if that's what you're wrapping.)
44
+
45
+ user system total real
46
+ set: cache:dalli:bin 5.710000 1.870000 7.580000 ( 10.210710) <- Cache.wrap(Dalli::Client.new)
47
+ set: cache:libm:bin 1.320000 1.260000 2.580000 ( 5.913591) <- Cache.wrap(Memcached.new(:binary_protocol => true))
48
+ set: dalli:bin 5.350000 1.860000 7.210000 ( 9.860368) <- Dalli::Client.new
49
+ set: libm:ascii 0.760000 1.310000 2.070000 ( 5.369027)
50
+ set: libm:ascii:pipeline 0.280000 0.020000 0.300000 ( 0.300872)
51
+ set: libm:ascii:udp 0.640000 0.690000 1.330000 ( 3.618846)
52
+ set: libm:bin 0.640000 1.370000 2.010000 ( 5.287203) <- Memcached.new(:binary_protocol => true)
53
+ set: libm:bin:buffer 0.320000 0.170000 0.490000 ( 1.238471)
54
+ set: mclient:ascii 11.840000 3.820000 15.660000 ( 15.933338)
55
+ set: stash:bin 3.420000 1.300000 4.720000 ( 7.871299)
56
+
57
+ get: cache:dalli:bin 5.740000 2.050000 7.790000 ( 10.220809) <- Cache.wrap(Dalli::Client.new)
58
+ get: cache:libm:bin 1.330000 1.260000 2.590000 ( 5.789277) <- Cache.wrap(Memcached.new(:binary_protocol => true))
59
+ get: dalli:bin 5.430000 2.050000 7.480000 ( 9.945485) <- Dalli::Client.new
60
+ get: libm:ascii 0.970000 1.290000 2.260000 ( 5.421878)
61
+ get: libm:ascii:pipeline 1.030000 1.590000 2.620000 ( 5.728829)
62
+ get: libm:ascii:udp 0.790000 0.730000 1.520000 ( 3.393461)
63
+ get: libm:bin 0.830000 1.330000 2.160000 ( 5.362280) <- Memcached.new(:binary_protocol => true)
64
+ get: libm:bin:buffer 0.900000 1.640000 2.540000 ( 5.719478)
65
+ get: mclient:ascii 14.010000 3.860000 17.870000 ( 18.125730)
66
+ get: stash:bin 3.100000 1.320000 4.420000 ( 7.559659)
67
+
68
+ Thanks to https://github.com/fauna/memcached/blob/master/test/profile/benchmark.rb
69
+
32
70
  ## Features
33
71
 
34
72
  ### Forking/threading
@@ -47,7 +85,7 @@ The default ttl is 60 seconds.
47
85
 
48
86
  Everything gets marshalled. No option to turn it into "raw" mode. If you need that kind of control, please submit a patch or just use one of the other gems directly.
49
87
 
50
- ### Supported methods
88
+ ### Methods
51
89
 
52
90
  It will translate these methods to whatever Redis, Memcached, etc. client you're using:
53
91
 
@@ -71,7 +109,7 @@ Also provided for Rails compatibility:
71
109
  @cache.compare_and_swap
72
110
  @cache.read_multi 'hello', 'privyet', 'hallo'
73
111
 
74
- ### Supported clients
112
+ ## Supported clients
75
113
 
76
114
  Supported memcached clients:
77
115
 
@@ -0,0 +1,95 @@
1
+ # sabshere 2/22/11 v0.0.2
2
+
3
+ Darwin vidalia 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386
4
+ ruby 1.8.7 (2010-05-25 patchlevel 266) [i686-darwin9.8.0]
5
+ RUBY_VERSION=ruby-1.8.7-head
6
+ Ruby 1.8.7p266
7
+ Loaded memcached 1.0.6
8
+ Loaded remix-stash 1.1.3
9
+ Loaded memcache-client 1.8.5
10
+ Loaded cache 0.0.2
11
+ Loaded kgio 2.3.2
12
+ Loaded dalli 1.0.2
13
+ Loops is 20000
14
+ Stack depth is 0
15
+ Small value size is: 13 bytes
16
+ Large value size is: 4158 bytes
17
+ No matching processes belonging to you were found
18
+ user system total real
19
+ set: cache:dalli:bin 6.340000 1.880000 8.220000 ( 10.948888)
20
+ set: cache:libm:bin 5.730000 1.530000 7.260000 ( 10.640067)
21
+ set: dalli:bin 5.580000 1.860000 7.440000 ( 10.092303)
22
+ set: libm:ascii 0.840000 1.290000 2.130000 ( 5.445700)
23
+ set: libm:ascii:pipeline 0.340000 0.020000 0.360000 ( 0.362669)
24
+ set: libm:ascii:udp 0.710000 0.710000 1.420000 ( 3.642532)
25
+ set: libm:bin 0.710000 1.320000 2.030000 ( 5.339189)
26
+ set: libm:bin:buffer 0.300000 0.110000 0.410000 ( 1.107518)
27
+ set: mclient:ascii 10.700000 3.670000 14.370000 ( 14.945212)
28
+ set: stash:bin 3.710000 1.370000 5.080000 ( 8.162312)
29
+
30
+ get: cache:dalli:bin 6.820000 2.080000 8.900000 ( 11.412364)
31
+ get: cache:libm:bin 5.670000 1.490000 7.160000 ( 10.392625)
32
+ get: dalli:bin 5.840000 2.090000 7.930000 ( 10.308551)
33
+ get: libm:ascii 0.970000 1.310000 2.280000 ( 5.562719)
34
+ get: libm:ascii:pipeline 1.060000 1.620000 2.680000 ( 5.881988)
35
+ get: libm:ascii:udp 0.820000 0.720000 1.540000 ( 3.585481)
36
+ get: libm:bin 0.810000 1.330000 2.140000 ( 5.310565)
37
+ get: libm:bin:buffer 0.940000 1.630000 2.570000 ( 5.677996)
38
+ get: mclient:ascii 12.680000 3.690000 16.370000 ( 16.930786)
39
+ get: stash:bin 3.390000 1.370000 4.760000 ( 7.658067)
40
+
41
+ delete: cache:dalli:bin 6.190000 2.080000 8.270000 ( 10.697357)
42
+ delete: cache:libm:bin 6.080000 1.580000 7.660000 ( 10.938304)
43
+ delete: dalli:bin 5.190000 2.080000 7.270000 ( 9.694417)
44
+ delete: libm:ascii 1.790000 1.400000 3.190000 ( 6.452993)
45
+ delete: libm:ascii:pipeline 0.550000 0.620000 1.170000 ( 1.226934)
46
+ delete: libm:ascii:udp 1.620000 0.870000 2.490000 ( 4.440414)
47
+ delete: libm:bin 1.720000 1.400000 3.120000 ( 6.322207)
48
+ delete: libm:bin:buffer 0.460000 0.520000 0.980000 ( 1.651911)
49
+ delete: mclient:ascii 10.610000 3.700000 14.310000 ( 14.815498)
50
+ delete:stash:bin => #<NoMethodError: undefined method `delete' for #<Remix::Stash:0x122e984>>
51
+
52
+ get-missing: cache:dalli:bin 6.300000 2.110000 8.410000 ( 10.962403)
53
+ get-missing: cache:libm:bin 7.090000 1.780000 8.870000 ( 12.435441)
54
+ get-missing: dalli:bin 5.730000 2.260000 7.990000 ( 10.758698)
55
+ get-missing: libm:ascii 2.070000 1.550000 3.620000 ( 7.211442)
56
+ get-missing: libm:ascii:pipeline 2.190000 1.920000 4.110000 ( 7.549889)
57
+ get-missing: libm:ascii:udp 1.820000 0.930000 2.750000 ( 4.887171)
58
+ get-missing: libm:bin 1.990000 1.510000 3.500000 ( 6.837518)
59
+ get-missing: libm:bin:buffer 2.050000 1.830000 3.880000 ( 7.134244)
60
+ get-missing: mclient:ascii 11.160000 3.790000 14.950000 ( 15.550381)
61
+ get-missing: stash:bin 3.240000 1.390000 4.630000 ( 7.602964)
62
+
63
+ set-large: cache:dalli:bin 8.160000 2.010000 10.170000 ( 13.146422)
64
+ set-large: cache:libm:bin 6.490000 1.610000 8.100000 ( 11.726796)
65
+ set-large: dalli:bin 7.490000 2.030000 9.520000 ( 12.402519)
66
+ set-large: libm:ascii 0.920000 1.400000 2.320000 ( 5.925636)
67
+ set-large: libm:ascii:pipeline 0.630000 0.450000 1.080000 ( 1.246708)
68
+ set-large: libm:ascii:udp 0.790000 0.820000 1.610000 ( 4.095793)
69
+ set-large: libm:bin 0.810000 1.440000 2.250000 ( 5.770076)
70
+ set-large: libm:bin:buffer 0.570000 0.640000 1.210000 ( 2.286722)
71
+ set-large: mclient:ascii 11.940000 3.910000 15.850000 ( 17.592266)
72
+ set-large: stash:bin 6.250000 1.510000 7.760000 ( 13.191809)
73
+
74
+ get-large: cache:dalli:bin 8.320000 2.460000 10.780000 ( 13.958967)
75
+ get-large: cache:libm:bin 10.740000 1.760000 12.500000 ( 16.610462)
76
+ get-large: dalli:bin 7.270000 2.460000 9.730000 ( 12.867557)
77
+ get-large: libm:ascii 1.590000 1.540000 3.130000 ( 7.126347)
78
+ get-large: libm:ascii:pipeline 1.700000 1.900000 3.600000 ( 7.440423)
79
+ get-large: libm:ascii:udp 1.420000 0.950000 2.370000 ( 4.683143)
80
+ get-large: libm:bin 1.440000 1.580000 3.020000 ( 6.955872)
81
+ get-large: libm:bin:buffer 1.550000 1.920000 3.470000 ( 7.199426)
82
+ get-large: mclient:ascii 15.460000 4.560000 20.020000 ( 20.855362)
83
+ get-large: stash:bin 3.610000 1.450000 5.060000 ( 8.103802)
84
+
85
+ hash:jenkins 0.660000 0.010000 0.670000 ( 0.660554)
86
+ hash:hsieh 0.310000 0.000000 0.310000 ( 0.323458)
87
+ hash:default 0.620000 0.000000 0.620000 ( 0.616587)
88
+ hash:fnv1_32 0.620000 0.000000 0.620000 ( 0.631255)
89
+ hash:fnv1_64 1.280000 0.010000 1.290000 ( 1.291580)
90
+ hash:none 0.320000 0.000000 0.320000 ( 0.324198)
91
+ hash:md5 1.030000 0.000000 1.030000 ( 1.046663)
92
+ hash:murmur 0.560000 0.010000 0.570000 ( 0.574408)
93
+ hash:fnv1a_32 0.660000 0.000000 0.660000 ( 0.670788)
94
+ hash:fnv1a_64 0.690000 0.000000 0.690000 ( 0.701477)
95
+ hash:crc 0.640000 0.010000 0.650000 ( 0.646991)
@@ -0,0 +1,96 @@
1
+ # sabshere 2/22/11 v0.0.3
2
+
3
+ vidalia:~/github/cache (master) $ ruby test/profile/benchmark.rb
4
+ Darwin vidalia 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386
5
+ ruby 1.8.7 (2010-05-25 patchlevel 266) [i686-darwin9.8.0]
6
+ RUBY_VERSION=ruby-1.8.7-head
7
+ Ruby 1.8.7p266
8
+ Loaded memcached 1.0.6
9
+ Loaded remix-stash 1.1.3
10
+ Loaded memcache-client 1.8.5
11
+ Loaded cache 0.0.3
12
+ Loaded kgio 2.3.2
13
+ Loaded dalli 1.0.2
14
+ Loops is 20000
15
+ Stack depth is 0
16
+ Small value size is: 13 bytes
17
+ Large value size is: 4158 bytes
18
+ No matching processes belonging to you were found
19
+ user system total real
20
+ set: cache:dalli:bin 6.020000 1.890000 7.910000 ( 10.568499)
21
+ set: cache:libm:bin 1.460000 1.280000 2.740000 ( 6.112829)
22
+ set: dalli:bin 5.640000 1.870000 7.510000 ( 10.215219)
23
+ set: libm:ascii 0.820000 1.320000 2.140000 ( 5.446435)
24
+ set: libm:ascii:pipeline 0.360000 0.010000 0.370000 ( 0.378485)
25
+ set: libm:ascii:udp 0.700000 0.720000 1.420000 ( 3.659001)
26
+ set: libm:bin 0.720000 1.340000 2.060000 ( 5.364179)
27
+ set: libm:bin:buffer 0.300000 0.120000 0.420000 ( 1.105467)
28
+ set: mclient:ascii 10.860000 3.820000 14.680000 ( 15.175516)
29
+ set: stash:bin 3.700000 1.350000 5.050000 ( 8.229477)
30
+
31
+ get: cache:dalli:bin 6.130000 2.070000 8.200000 ( 10.683650)
32
+ get: cache:libm:bin 1.440000 1.230000 2.670000 ( 5.908044)
33
+ get: dalli:bin 5.800000 2.080000 7.880000 ( 10.324650)
34
+ get: libm:ascii 0.970000 1.320000 2.290000 ( 5.582769)
35
+ get: libm:ascii:pipeline 1.050000 1.580000 2.630000 ( 5.956804)
36
+ get: libm:ascii:udp 0.820000 0.720000 1.540000 ( 3.605324)
37
+ get: libm:bin 0.820000 1.340000 2.160000 ( 5.329828)
38
+ get: libm:bin:buffer 0.940000 1.630000 2.570000 ( 5.748327)
39
+ get: mclient:ascii 12.900000 3.860000 16.760000 ( 17.249089)
40
+ get: stash:bin 3.360000 1.320000 4.680000 ( 7.949412)
41
+
42
+ delete: cache:dalli:bin 5.610000 2.100000 7.710000 ( 10.029324)
43
+ delete: cache:libm:bin 2.030000 1.370000 3.400000 ( 6.651471)
44
+ delete: dalli:bin 5.230000 2.110000 7.340000 ( 9.676535)
45
+ delete: libm:ascii 1.790000 1.380000 3.170000 ( 6.550488)
46
+ delete: libm:ascii:pipeline 0.570000 0.650000 1.220000 ( 1.346079)
47
+ delete: libm:ascii:udp 1.650000 0.870000 2.520000 ( 4.527372)
48
+ delete: libm:bin 1.730000 1.390000 3.120000 ( 6.469119)
49
+ delete: libm:bin:buffer 0.480000 0.550000 1.030000 ( 1.773955)
50
+ delete: mclient:ascii 10.890000 3.930000 14.820000 ( 15.286474)
51
+ delete:stash:bin => #<NoMethodError: undefined method `delete' for #<Remix::Stash:0x11cc360>>
52
+
53
+ get-missing: cache:dalli:bin 5.970000 2.260000 8.230000 ( 10.874274)
54
+ get-missing: cache:libm:bin 2.470000 1.580000 4.050000 ( 7.471236)
55
+ get-missing: dalli:bin 5.550000 2.230000 7.780000 ( 10.420783)
56
+ get-missing: libm:ascii 2.080000 1.560000 3.640000 ( 7.186221)
57
+ get-missing: libm:ascii:pipeline 2.160000 1.890000 4.050000 ( 7.482394)
58
+ get-missing: libm:ascii:udp 1.850000 0.930000 2.780000 ( 4.956340)
59
+ get-missing: libm:bin 2.030000 1.470000 3.500000 ( 7.022853)
60
+ get-missing: libm:bin:buffer 2.090000 1.890000 3.980000 ( 7.314636)
61
+ get-missing: mclient:ascii 11.500000 4.010000 15.510000 ( 16.029498)
62
+ get-missing: stash:bin 3.280000 1.390000 4.670000 ( 7.834190)
63
+
64
+ set-large: cache:dalli:bin 8.070000 2.080000 10.150000 ( 13.126027)
65
+ set-large: cache:libm:bin 2.530000 1.410000 3.940000 ( 7.636479)
66
+ set-large: dalli:bin 7.650000 2.070000 9.720000 ( 12.691443)
67
+ set-large: libm:ascii 0.930000 1.420000 2.350000 ( 6.066637)
68
+ set-large: libm:ascii:pipeline 0.640000 0.450000 1.090000 ( 1.279625)
69
+ set-large: libm:ascii:udp 0.820000 0.860000 1.680000 ( 4.318411)
70
+ set-large: libm:bin 0.810000 1.450000 2.260000 ( 5.870205)
71
+ set-large: libm:bin:buffer 0.590000 0.660000 1.250000 ( 2.492524)
72
+ set-large: mclient:ascii 12.290000 4.120000 16.410000 ( 17.042205)
73
+ set-large: stash:bin 5.810000 1.430000 7.240000 ( 10.615813)
74
+
75
+ get-large: cache:dalli:bin 7.680000 2.460000 10.140000 ( 13.286558)
76
+ get-large: cache:libm:bin 6.530000 1.500000 8.030000 ( 11.980532)
77
+ get-large: dalli:bin 7.240000 2.460000 9.700000 ( 12.743058)
78
+ get-large: libm:ascii 1.610000 1.540000 3.150000 ( 7.086940)
79
+ get-large: libm:ascii:pipeline 1.720000 1.890000 3.610000 ( 7.410838)
80
+ get-large: libm:ascii:udp 1.420000 0.960000 2.380000 ( 4.688834)
81
+ get-large: libm:bin 1.440000 1.590000 3.030000 ( 6.935013)
82
+ get-large: libm:bin:buffer 1.600000 1.920000 3.520000 ( 7.278831)
83
+ get-large: mclient:ascii 15.700000 4.800000 20.500000 ( 21.276235)
84
+ get-large: stash:bin 3.580000 1.420000 5.000000 ( 8.259296)
85
+
86
+ hash:hsieh 0.310000 0.000000 0.310000 ( 0.314801)
87
+ hash:none 0.320000 0.000000 0.320000 ( 0.317238)
88
+ hash:default 0.610000 0.000000 0.610000 ( 0.627191)
89
+ hash:fnv1_64 1.270000 0.010000 1.280000 ( 1.274384)
90
+ hash:md5 1.070000 0.000000 1.070000 ( 1.080698)
91
+ hash:murmur 0.560000 0.000000 0.560000 ( 0.570058)
92
+ hash:fnv1a_64 0.690000 0.000000 0.690000 ( 0.701543)
93
+ hash:fnv1a_32 0.680000 0.010000 0.690000 ( 0.684682)
94
+ hash:jenkins 0.660000 0.000000 0.660000 ( 0.668542)
95
+ hash:crc 0.660000 0.000000 0.660000 ( 0.665331)
96
+ hash:fnv1_32 0.630000 0.000000 0.630000 ( 0.636520)
@@ -0,0 +1,94 @@
1
+ vidalia:~/github/cache (master) $ ruby test/profile/benchmark.rb
2
+ Darwin vidalia 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386
3
+ ruby 1.8.7 (2010-05-25 patchlevel 266) [i686-darwin9.8.0]
4
+ RUBY_VERSION=ruby-1.8.7-head
5
+ Ruby 1.8.7p266
6
+ Loaded memcached 1.2
7
+ Loaded remix-stash 1.1.3
8
+ Loaded memcache-client 1.8.5
9
+ Loaded cache 0.1.2
10
+ Loaded kgio 2.3.2
11
+ Loaded dalli 1.0.2
12
+ Loops is 20000
13
+ Stack depth is 0
14
+ Small value size is: 13 bytes
15
+ Large value size is: 4158 bytes
16
+ No matching processes belonging to you were found
17
+ user system total real
18
+ set: cache:dalli:bin 5.720000 1.860000 7.580000 ( 10.301808)
19
+ set: cache:libm:bin 1.250000 1.270000 2.520000 ( 5.892224)
20
+ set: dalli:bin 5.430000 1.860000 7.290000 ( 9.966409)
21
+ set: libm:ascii 0.760000 1.330000 2.090000 ( 5.348975)
22
+ set: libm:ascii:pipeline 0.280000 0.010000 0.290000 ( 0.297230)
23
+ set: libm:ascii:udp 0.650000 0.710000 1.360000 ( 3.593454)
24
+ set: libm:bin 0.640000 1.360000 2.000000 ( 5.285160)
25
+ set: libm:bin:buffer 0.270000 0.160000 0.430000 ( 1.234561)
26
+ set: mclient:ascii 11.330000 3.780000 15.110000 ( 16.174666)
27
+ set: stash:bin 3.420000 1.330000 4.750000 ( 8.016146)
28
+
29
+ get: cache:dalli:bin 5.870000 1.950000 7.820000 ( 10.644558)
30
+ get: cache:libm:bin 1.370000 1.200000 2.570000 ( 5.946502)
31
+ get: dalli:bin 5.580000 2.070000 7.650000 ( 10.361689)
32
+ get: libm:ascii 0.980000 1.300000 2.280000 ( 5.455222)
33
+ get: libm:ascii:pipeline 1.030000 1.590000 2.620000 ( 5.875592)
34
+ get: libm:ascii:udp 0.820000 0.730000 1.550000 ( 3.515632)
35
+ get: libm:bin 0.830000 1.330000 2.160000 ( 5.381290)
36
+ get: libm:bin:buffer 0.900000 1.630000 2.530000 ( 5.761412)
37
+ get: mclient:ascii 13.630000 3.870000 17.500000 ( 17.912800)
38
+ get: stash:bin 3.100000 1.340000 4.440000 ( 7.667182)
39
+
40
+ delete: cache:dalli:bin 6.270000 2.390000 8.660000 ( 11.313843)
41
+ delete: cache:libm:bin 2.190000 1.560000 3.750000 ( 7.459292)
42
+ delete: dalli:bin 5.660000 2.340000 8.000000 ( 10.374507)
43
+ delete: libm:ascii 1.850000 1.570000 3.420000 ( 6.922356)
44
+ delete: libm:ascii:pipeline 0.230000 0.010000 0.240000 ( 0.242642)
45
+ delete: libm:ascii:udp 1.690000 0.930000 2.620000 ( 4.749489)
46
+ delete: libm:bin 1.780000 1.530000 3.310000 ( 6.768449)
47
+ delete: libm:bin:buffer 1.890000 1.880000 3.770000 ( 7.149319)
48
+ delete: mclient:ascii 11.940000 4.040000 15.980000 ( 16.423645)
49
+ delete:stash:bin => #<NoMethodError: undefined method `delete' for #<Remix::Stash:0x1249824>>
50
+
51
+ get-missing: cache:dalli:bin 5.530000 2.140000 7.670000 ( 10.187561)
52
+ get-missing: cache:libm:bin 2.200000 1.510000 3.710000 ( 6.953625)
53
+ get-missing: dalli:bin 5.230000 2.160000 7.390000 ( 9.891539)
54
+ get-missing: libm:ascii 1.960000 1.420000 3.380000 ( 6.459433)
55
+ get-missing: libm:ascii:pipeline 2.080000 1.860000 3.940000 ( 6.984890)
56
+ get-missing: libm:ascii:udp 1.730000 0.910000 2.640000 ( 4.582510)
57
+ get-missing: libm:bin 1.950000 1.470000 3.420000 ( 6.854775)
58
+ get-missing: libm:bin:buffer 2.060000 1.900000 3.960000 ( 7.180759)
59
+ get-missing: mclient:ascii 12.350000 4.100000 16.450000 ( 16.986064)
60
+ get-missing: stash:bin 3.110000 1.410000 4.520000 ( 7.908972)
61
+
62
+ set-large: cache:dalli:bin 8.650000 2.110000 10.760000 ( 13.864690)
63
+ set-large: cache:libm:bin 2.600000 1.450000 4.050000 ( 7.811509)
64
+ set-large: dalli:bin 8.250000 2.100000 10.350000 ( 13.370233)
65
+ set-large: libm:ascii 0.890000 1.460000 2.350000 ( 6.069504)
66
+ set-large: libm:ascii:pipeline 0.570000 0.450000 1.020000 ( 1.232906)
67
+ set-large: libm:ascii:udp 0.730000 0.850000 1.580000 ( 4.174216)
68
+ set-large: libm:bin 0.760000 1.510000 2.270000 ( 5.966586)
69
+ set-large: libm:bin:buffer 0.530000 0.700000 1.230000 ( 2.419153)
70
+ set-large: mclient:ascii 13.540000 4.250000 17.790000 ( 18.447711)
71
+ set-large: stash:bin 6.100000 1.500000 7.600000 ( 11.216811)
72
+
73
+ get-large: cache:dalli:bin 8.000000 2.480000 10.480000 ( 13.450322)
74
+ get-large: cache:libm:bin 6.820000 1.490000 8.310000 ( 12.331486)
75
+ get-large: dalli:bin 7.670000 2.490000 10.160000 ( 13.148162)
76
+ get-large: libm:ascii 1.740000 1.540000 3.280000 ( 7.256110)
77
+ get-large: libm:ascii:pipeline 1.870000 1.960000 3.830000 ( 7.723493)
78
+ get-large: libm:ascii:udp 1.560000 0.980000 2.540000 ( 4.823281)
79
+ get-large: libm:bin 1.590000 1.590000 3.180000 ( 7.018376)
80
+ get-large: libm:bin:buffer 1.730000 1.960000 3.690000 ( 7.365047)
81
+ get-large: mclient:ascii 17.160000 4.890000 22.050000 ( 22.647077)
82
+ get-large: stash:bin 3.290000 1.440000 4.730000 ( 7.950154)
83
+
84
+ hash:jenkins 0.550000 0.000000 0.550000 ( 0.561738)
85
+ hash:default 0.550000 0.000000 0.550000 ( 0.553209)
86
+ hash:crc 0.660000 0.000000 0.660000 ( 0.657155)
87
+ hash:fnv1_32 0.530000 0.010000 0.540000 ( 0.529303)
88
+ hash:hsieh 0.280000 0.000000 0.280000 ( 0.281685)
89
+ hash:fnv1_64 1.160000 0.000000 1.160000 ( 1.169524)
90
+ hash:none 0.310000 0.000000 0.310000 ( 0.313095)
91
+ hash:murmur 0.450000 0.000000 0.450000 ( 0.454460)
92
+ hash:md5 0.950000 0.010000 0.960000 ( 0.949226)
93
+ hash:fnv1a_64 0.590000 0.000000 0.590000 ( 0.590362)
94
+ hash:fnv1a_32 0.590000 0.000000 0.590000 ( 0.599005)
@@ -0,0 +1,94 @@
1
+ vidalia:~/github/cache (master) $ ruby test/profile/benchmark.rb
2
+ Darwin vidalia 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386
3
+ ruby 1.8.7 (2010-05-25 patchlevel 266) [i686-darwin9.8.0]
4
+ RUBY_VERSION=ruby-1.8.7-head
5
+ Ruby 1.8.7p266
6
+ Loaded memcached 1.2.1
7
+ Loaded remix-stash 1.1.3
8
+ Loaded memcache-client 1.8.5
9
+ Loaded cache 0.2.1
10
+ Loaded kgio 2.3.2
11
+ Loaded dalli 1.0.2
12
+ Loops is 20000
13
+ Stack depth is 0
14
+ Small value size is: 13 bytes
15
+ Large value size is: 4158 bytes
16
+ No matching processes belonging to you were found
17
+ user system total real
18
+ set: cache:dalli:bin 5.720000 1.870000 7.590000 ( 10.245466)
19
+ set: cache:libm:bin 1.320000 1.260000 2.580000 ( 5.921810)
20
+ set: dalli:bin 5.360000 1.870000 7.230000 ( 9.871376)
21
+ set: libm:ascii 0.770000 1.310000 2.080000 ( 5.365856)
22
+ set: libm:ascii:pipeline 0.280000 0.020000 0.300000 ( 0.296948)
23
+ set: libm:ascii:udp 0.630000 0.690000 1.320000 ( 3.624834)
24
+ set: libm:bin 0.640000 1.380000 2.020000 ( 5.280843)
25
+ set: libm:bin:buffer 0.280000 0.180000 0.460000 ( 1.215491)
26
+ set: mclient:ascii 11.840000 3.800000 15.640000 ( 15.882581)
27
+ set: stash:bin 3.450000 1.320000 4.770000 ( 7.903133)
28
+
29
+ get: cache:dalli:bin 5.730000 2.040000 7.770000 ( 10.224065)
30
+ get: cache:libm:bin 1.340000 1.220000 2.560000 ( 5.813579)
31
+ get: dalli:bin 5.460000 2.060000 7.520000 ( 9.941512)
32
+ get: libm:ascii 0.970000 1.300000 2.270000 ( 5.396642)
33
+ get: libm:ascii:pipeline 1.030000 1.590000 2.620000 ( 5.773589)
34
+ get: libm:ascii:udp 0.790000 0.720000 1.510000 ( 3.391872)
35
+ get: libm:bin 0.820000 1.340000 2.160000 ( 5.363674)
36
+ get: libm:bin:buffer 0.920000 1.690000 2.610000 ( 5.658819)
37
+ get: mclient:ascii 14.410000 3.980000 18.390000 ( 18.660373)
38
+ get: stash:bin 3.310000 1.420000 4.730000 ( 7.973290)
39
+
40
+ delete: cache:dalli:bin 5.850000 2.250000 8.100000 ( 10.467114)
41
+ delete: cache:libm:bin 2.090000 1.530000 3.620000 ( 7.063066)
42
+ delete: dalli:bin 5.370000 2.250000 7.620000 ( 9.882647)
43
+ delete: libm:ascii 1.780000 1.500000 3.280000 ( 6.717891)
44
+ delete: libm:ascii:pipeline 0.220000 0.010000 0.230000 ( 0.240083)
45
+ delete: libm:ascii:udp 1.570000 0.900000 2.470000 ( 4.588112)
46
+ delete: libm:bin 1.740000 1.480000 3.220000 ( 6.629920)
47
+ delete: libm:bin:buffer 1.860000 1.890000 3.750000 ( 6.899297)
48
+ delete: mclient:ascii 12.090000 3.990000 16.080000 ( 16.328276)
49
+ delete:stash:bin => #<NoMethodError: undefined method `delete' for #<Remix::Stash:0x1a68384>>
50
+
51
+ get-missing: cache:dalli:bin 5.460000 2.160000 7.620000 ( 10.150363)
52
+ get-missing: cache:libm:bin 2.230000 1.500000 3.730000 ( 6.989031)
53
+ get-missing: dalli:bin 5.120000 2.160000 7.280000 ( 9.790094)
54
+ get-missing: libm:ascii 1.950000 1.410000 3.360000 ( 6.530576)
55
+ get-missing: libm:ascii:pipeline 2.050000 1.830000 3.880000 ( 6.787680)
56
+ get-missing: libm:ascii:udp 1.760000 0.900000 2.660000 ( 4.657937)
57
+ get-missing: libm:bin 1.940000 1.490000 3.430000 ( 6.782449)
58
+ get-missing: libm:bin:buffer 2.060000 1.920000 3.980000 ( 7.178149)
59
+ get-missing: mclient:ascii 12.630000 4.060000 16.690000 ( 16.921560)
60
+ get-missing: stash:bin 3.060000 1.380000 4.440000 ( 7.676172)
61
+
62
+ set-large: cache:dalli:bin 8.640000 2.120000 10.760000 ( 13.677315)
63
+ set-large: cache:libm:bin 2.720000 1.440000 4.160000 ( 7.890247)
64
+ set-large: dalli:bin 8.260000 2.120000 10.380000 ( 13.237021)
65
+ set-large: libm:ascii 0.900000 1.460000 2.360000 ( 6.131867)
66
+ set-large: libm:ascii:pipeline 0.580000 0.460000 1.040000 ( 1.293182)
67
+ set-large: libm:ascii:udp 0.720000 0.840000 1.560000 ( 4.197623)
68
+ set-large: libm:bin 0.770000 1.500000 2.270000 ( 5.938192)
69
+ set-large: libm:bin:buffer 0.530000 0.710000 1.240000 ( 2.383338)
70
+ set-large: mclient:ascii 13.790000 4.210000 18.000000 ( 18.322264)
71
+ set-large: stash:bin 6.150000 1.440000 7.590000 ( 10.888669)
72
+
73
+ get-large: cache:dalli:bin 8.080000 2.510000 10.590000 ( 13.538810)
74
+ get-large: cache:libm:bin 6.870000 1.460000 8.330000 ( 12.279483)
75
+ get-large: dalli:bin 7.630000 2.470000 10.100000 ( 13.012382)
76
+ get-large: libm:ascii 1.730000 1.500000 3.230000 ( 7.078254)
77
+ get-large: libm:ascii:pipeline 1.870000 1.930000 3.800000 ( 7.427236)
78
+ get-large: libm:ascii:udp 1.580000 0.950000 2.530000 ( 4.793014)
79
+ get-large: libm:bin 1.600000 1.560000 3.160000 ( 6.958339)
80
+ get-large: libm:bin:buffer 1.760000 1.960000 3.720000 ( 7.333753)
81
+ get-large: mclient:ascii 17.450000 4.840000 22.290000 ( 22.647341)
82
+ get-large: stash:bin 3.350000 1.420000 4.770000 ( 8.034720)
83
+
84
+ hash:jenkins 0.520000 0.000000 0.520000 ( 0.528327)
85
+ hash:default 0.580000 0.000000 0.580000 ( 0.574388)
86
+ hash:crc 0.620000 0.000000 0.620000 ( 0.623146)
87
+ hash:fnv1_32 0.530000 0.000000 0.530000 ( 0.536423)
88
+ hash:hsieh 0.320000 0.000000 0.320000 ( 0.316024)
89
+ hash:fnv1_64 1.150000 0.000000 1.150000 ( 1.151304)
90
+ hash:none 0.290000 0.000000 0.290000 ( 0.296099)
91
+ hash:murmur 0.460000 0.000000 0.460000 ( 0.458312)
92
+ hash:md5 0.990000 0.000000 0.990000 ( 0.995194)
93
+ hash:fnv1a_64 0.590000 0.000000 0.590000 ( 0.584158)
94
+ hash:fnv1a_32 0.580000 0.000000 0.580000 ( 0.593039)
@@ -0,0 +1,94 @@
1
+ vidalia:~/github/cache (master) $ ruby test/profile/benchmark.rb
2
+ Darwin vidalia 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386
3
+ ruby 1.8.7 (2010-05-25 patchlevel 266) [i686-darwin9.8.0]
4
+ RUBY_VERSION=ruby-1.8.7-head
5
+ Ruby 1.8.7p266
6
+ Loaded memcached 1.2.1
7
+ Loaded remix-stash 1.1.3
8
+ Loaded memcache-client 1.8.5
9
+ Loaded cache 0.2.2
10
+ Loaded kgio 2.3.2
11
+ Loaded dalli 1.0.2
12
+ Loops is 20000
13
+ Stack depth is 0
14
+ Small value size is: 13 bytes
15
+ Large value size is: 4158 bytes
16
+ No matching processes belonging to you were found
17
+ user system total real
18
+ set: cache:dalli:bin 5.710000 1.870000 7.580000 ( 10.210710)
19
+ set: cache:libm:bin 1.320000 1.260000 2.580000 ( 5.913591)
20
+ set: dalli:bin 5.350000 1.860000 7.210000 ( 9.860368)
21
+ set: libm:ascii 0.760000 1.310000 2.070000 ( 5.369027)
22
+ set: libm:ascii:pipeline 0.280000 0.020000 0.300000 ( 0.300872)
23
+ set: libm:ascii:udp 0.640000 0.690000 1.330000 ( 3.618846)
24
+ set: libm:bin 0.640000 1.370000 2.010000 ( 5.287203)
25
+ set: libm:bin:buffer 0.320000 0.170000 0.490000 ( 1.238471)
26
+ set: mclient:ascii 11.840000 3.820000 15.660000 ( 15.933338)
27
+ set: stash:bin 3.420000 1.300000 4.720000 ( 7.871299)
28
+
29
+ get: cache:dalli:bin 5.740000 2.050000 7.790000 ( 10.220809)
30
+ get: cache:libm:bin 1.330000 1.260000 2.590000 ( 5.789277)
31
+ get: dalli:bin 5.430000 2.050000 7.480000 ( 9.945485)
32
+ get: libm:ascii 0.970000 1.290000 2.260000 ( 5.421878)
33
+ get: libm:ascii:pipeline 1.030000 1.590000 2.620000 ( 5.728829)
34
+ get: libm:ascii:udp 0.790000 0.730000 1.520000 ( 3.393461)
35
+ get: libm:bin 0.830000 1.330000 2.160000 ( 5.362280)
36
+ get: libm:bin:buffer 0.900000 1.640000 2.540000 ( 5.719478)
37
+ get: mclient:ascii 14.010000 3.860000 17.870000 ( 18.125730)
38
+ get: stash:bin 3.100000 1.320000 4.420000 ( 7.559659)
39
+
40
+ delete: cache:dalli:bin 6.680000 2.580000 9.260000 ( 11.757354)
41
+ delete: cache:libm:bin 2.220000 1.600000 3.820000 ( 7.429178)
42
+ delete: dalli:bin 5.670000 2.380000 8.050000 ( 10.352835)
43
+ delete: libm:ascii 1.850000 1.550000 3.400000 ( 6.950162)
44
+ delete: libm:ascii:pipeline 0.220000 0.010000 0.230000 ( 0.235296)
45
+ delete: libm:ascii:udp 1.630000 0.930000 2.560000 ( 4.708250)
46
+ delete: libm:bin 1.790000 1.520000 3.310000 ( 6.789130)
47
+ delete: libm:bin:buffer 1.910000 1.850000 3.760000 ( 7.065142)
48
+ delete: mclient:ascii 12.110000 4.000000 16.110000 ( 16.356892)
49
+ delete:stash:bin => #<NoMethodError: undefined method `delete' for #<Remix::Stash:0x1a58560>>
50
+
51
+ get-missing: cache:dalli:bin 5.390000 2.140000 7.530000 ( 9.990644)
52
+ get-missing: cache:libm:bin 2.200000 1.450000 3.650000 ( 6.940150)
53
+ get-missing: dalli:bin 5.070000 2.130000 7.200000 ( 9.662024)
54
+ get-missing: libm:ascii 1.940000 1.380000 3.320000 ( 6.361626)
55
+ get-missing: libm:ascii:pipeline 2.030000 1.830000 3.860000 ( 6.720970)
56
+ get-missing: libm:ascii:udp 1.740000 0.890000 2.630000 ( 4.607945)
57
+ get-missing: libm:bin 1.920000 1.450000 3.370000 ( 6.779409)
58
+ get-missing: libm:bin:buffer 2.030000 1.850000 3.880000 ( 7.157176)
59
+ get-missing: mclient:ascii 12.590000 4.060000 16.650000 ( 16.909974)
60
+ get-missing: stash:bin 3.100000 1.380000 4.480000 ( 7.754969)
61
+
62
+ set-large: cache:dalli:bin 8.780000 2.160000 10.940000 ( 13.767983)
63
+ set-large: cache:libm:bin 2.750000 1.460000 4.210000 ( 8.026319)
64
+ set-large: dalli:bin 8.400000 2.160000 10.560000 ( 13.420624)
65
+ set-large: libm:ascii 0.930000 1.480000 2.410000 ( 6.291813)
66
+ set-large: libm:ascii:pipeline 0.580000 0.450000 1.030000 ( 1.230049)
67
+ set-large: libm:ascii:udp 0.740000 0.870000 1.610000 ( 4.308647)
68
+ set-large: libm:bin 0.790000 1.500000 2.290000 ( 6.057129)
69
+ set-large: libm:bin:buffer 0.540000 0.710000 1.250000 ( 2.423327)
70
+ set-large: mclient:ascii 13.950000 4.260000 18.210000 ( 18.586740)
71
+ set-large: stash:bin 6.100000 1.440000 7.540000 ( 10.858524)
72
+
73
+ get-large: cache:dalli:bin 8.080000 2.500000 10.580000 ( 13.529802)
74
+ get-large: cache:libm:bin 6.880000 1.510000 8.390000 ( 12.255805)
75
+ get-large: dalli:bin 7.670000 2.480000 10.150000 ( 13.091946)
76
+ get-large: libm:ascii 1.780000 1.520000 3.300000 ( 7.155644)
77
+ get-large: libm:ascii:pipeline 1.890000 1.900000 3.790000 ( 7.469286)
78
+ get-large: libm:ascii:udp 1.570000 0.970000 2.540000 ( 4.810661)
79
+ get-large: libm:bin 1.610000 1.560000 3.170000 ( 6.964619)
80
+ get-large: libm:bin:buffer 1.750000 1.930000 3.680000 ( 7.370880)
81
+ get-large: mclient:ascii 17.490000 4.840000 22.330000 ( 22.742459)
82
+ get-large: stash:bin 3.310000 1.410000 4.720000 ( 8.020154)
83
+
84
+ hash:jenkins 0.590000 0.000000 0.590000 ( 0.598982)
85
+ hash:default 0.540000 0.000000 0.540000 ( 0.539465)
86
+ hash:crc 0.660000 0.010000 0.670000 ( 0.659791)
87
+ hash:fnv1_32 0.510000 0.000000 0.510000 ( 0.514745)
88
+ hash:hsieh 0.290000 0.000000 0.290000 ( 0.289317)
89
+ hash:fnv1_64 1.160000 0.000000 1.160000 ( 1.157847)
90
+ hash:none 0.320000 0.000000 0.320000 ( 0.324526)
91
+ hash:murmur 0.470000 0.000000 0.470000 ( 0.469895)
92
+ hash:md5 1.000000 0.000000 1.000000 ( 1.000877)
93
+ hash:fnv1a_64 0.540000 0.010000 0.550000 ( 0.542104)
94
+ hash:fnv1a_32 0.560000 0.000000 0.560000 ( 0.567425)
@@ -9,8 +9,8 @@ Gem::Specification.new do |s|
9
9
  s.authors = ["Seamus Abshere"]
10
10
  s.email = ["seamus@abshere.net"]
11
11
  s.homepage = "https://github.com/seamusabshere/cache"
12
- s.summary = %q{Wraps memcached, redis, memcache-client, dalli and handles their weirdnesses, including forking}
13
- s.description = %q{A unified cache handling interface for Ruby, inspired by (but simpler than) Perl's Cache::Cache}
12
+ s.summary = %q{A unified cache handling interface inspired by libraries like ActiveSupport::Cache::Store, Perl's Cache::Cache, CHI, etc.}
13
+ s.description = %q{Wraps memcached, redis, memcache-client, dalli and handles their weirdnesses, including forking}
14
14
 
15
15
  s.rubyforge_project = "cache"
16
16
 
@@ -1,3 +1,3 @@
1
1
  class Cache
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cache
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 2
10
- version: 0.2.2
9
+ - 3
10
+ version: 0.2.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Seamus Abshere
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-03-07 00:00:00 -06:00
18
+ date: 2011-03-09 00:00:00 -06:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -132,7 +132,7 @@ dependencies:
132
132
  version: "0"
133
133
  type: :development
134
134
  version_requirements: *id008
135
- description: A unified cache handling interface for Ruby, inspired by (but simpler than) Perl's Cache::Cache
135
+ description: Wraps memcached, redis, memcache-client, dalli and handles their weirdnesses, including forking
136
136
  email:
137
137
  - seamus@abshere.net
138
138
  executables: []
@@ -143,10 +143,14 @@ extra_rdoc_files: []
143
143
 
144
144
  files:
145
145
  - .gitignore
146
- - BENCHMARKS
147
146
  - Gemfile
148
147
  - README.md
149
148
  - Rakefile
149
+ - benchmarks/v0.0.2.txt
150
+ - benchmarks/v0.0.3.txt
151
+ - benchmarks/v0.1.2.txt
152
+ - benchmarks/v0.2.1.txt
153
+ - benchmarks/v0.2.2.txt
150
154
  - cache.gemspec
151
155
  - lib/cache.rb
152
156
  - lib/cache/config.rb
@@ -195,7 +199,7 @@ rubyforge_project: cache
195
199
  rubygems_version: 1.3.7
196
200
  signing_key:
197
201
  specification_version: 3
198
- summary: Wraps memcached, redis, memcache-client, dalli and handles their weirdnesses, including forking
202
+ summary: A unified cache handling interface inspired by libraries like ActiveSupport::Cache::Store, Perl's Cache::Cache, CHI, etc.
199
203
  test_files:
200
204
  - test/helper.rb
201
205
  - test/profile/benchmark.rb
data/BENCHMARKS DELETED
@@ -1,292 +0,0 @@
1
- # sabshere 3/4/11 v0.2.0
2
-
3
- vidalia:~/github/cache (master) $ ruby test/profile/benchmark.rb
4
- Darwin vidalia 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386
5
- ruby 1.8.7 (2010-05-25 patchlevel 266) [i686-darwin9.8.0]
6
- RUBY_VERSION=ruby-1.8.7-head
7
- Ruby 1.8.7p266
8
- Loaded memcached 1.2
9
- Loaded remix-stash 1.1.3
10
- Loaded memcache-client 1.8.5
11
- Loaded cache 0.1.2 # i just hadn't released the gem yet
12
- Loaded kgio 2.3.2
13
- Loaded dalli 1.0.2
14
- Loops is 20000
15
- Stack depth is 0
16
- Small value size is: 13 bytes
17
- Large value size is: 4158 bytes
18
- No matching processes belonging to you were found
19
- user system total real
20
- set: cache:dalli:bin 5.720000 1.860000 7.580000 ( 10.301808)
21
- set: cache:libm:bin 1.250000 1.270000 2.520000 ( 5.892224)
22
- set: dalli:bin 5.430000 1.860000 7.290000 ( 9.966409)
23
- set: libm:ascii 0.760000 1.330000 2.090000 ( 5.348975)
24
- set: libm:ascii:pipeline 0.280000 0.010000 0.290000 ( 0.297230)
25
- set: libm:ascii:udp 0.650000 0.710000 1.360000 ( 3.593454)
26
- set: libm:bin 0.640000 1.360000 2.000000 ( 5.285160)
27
- set: libm:bin:buffer 0.270000 0.160000 0.430000 ( 1.234561)
28
- set: mclient:ascii 11.330000 3.780000 15.110000 ( 16.174666)
29
- set: stash:bin 3.420000 1.330000 4.750000 ( 8.016146)
30
-
31
- get: cache:dalli:bin 5.870000 1.950000 7.820000 ( 10.644558)
32
- get: cache:libm:bin 1.370000 1.200000 2.570000 ( 5.946502)
33
- get: dalli:bin 5.580000 2.070000 7.650000 ( 10.361689)
34
- get: libm:ascii 0.980000 1.300000 2.280000 ( 5.455222)
35
- get: libm:ascii:pipeline 1.030000 1.590000 2.620000 ( 5.875592)
36
- get: libm:ascii:udp 0.820000 0.730000 1.550000 ( 3.515632)
37
- get: libm:bin 0.830000 1.330000 2.160000 ( 5.381290)
38
- get: libm:bin:buffer 0.900000 1.630000 2.530000 ( 5.761412)
39
- get: mclient:ascii 13.630000 3.870000 17.500000 ( 17.912800)
40
- get: stash:bin 3.100000 1.340000 4.440000 ( 7.667182)
41
-
42
- delete: cache:dalli:bin 6.270000 2.390000 8.660000 ( 11.313843)
43
- delete: cache:libm:bin 2.190000 1.560000 3.750000 ( 7.459292)
44
- delete: dalli:bin 5.660000 2.340000 8.000000 ( 10.374507)
45
- delete: libm:ascii 1.850000 1.570000 3.420000 ( 6.922356)
46
- delete: libm:ascii:pipeline 0.230000 0.010000 0.240000 ( 0.242642)
47
- delete: libm:ascii:udp 1.690000 0.930000 2.620000 ( 4.749489)
48
- delete: libm:bin 1.780000 1.530000 3.310000 ( 6.768449)
49
- delete: libm:bin:buffer 1.890000 1.880000 3.770000 ( 7.149319)
50
- delete: mclient:ascii 11.940000 4.040000 15.980000 ( 16.423645)
51
- delete:stash:bin => #<NoMethodError: undefined method `delete' for #<Remix::Stash:0x1249824>>
52
-
53
- get-missing: cache:dalli:bin 5.530000 2.140000 7.670000 ( 10.187561)
54
- get-missing: cache:libm:bin 2.200000 1.510000 3.710000 ( 6.953625)
55
- get-missing: dalli:bin 5.230000 2.160000 7.390000 ( 9.891539)
56
- get-missing: libm:ascii 1.960000 1.420000 3.380000 ( 6.459433)
57
- get-missing: libm:ascii:pipeline 2.080000 1.860000 3.940000 ( 6.984890)
58
- get-missing: libm:ascii:udp 1.730000 0.910000 2.640000 ( 4.582510)
59
- get-missing: libm:bin 1.950000 1.470000 3.420000 ( 6.854775)
60
- get-missing: libm:bin:buffer 2.060000 1.900000 3.960000 ( 7.180759)
61
- get-missing: mclient:ascii 12.350000 4.100000 16.450000 ( 16.986064)
62
- get-missing: stash:bin 3.110000 1.410000 4.520000 ( 7.908972)
63
-
64
- set-large: cache:dalli:bin 8.650000 2.110000 10.760000 ( 13.864690)
65
- set-large: cache:libm:bin 2.600000 1.450000 4.050000 ( 7.811509)
66
- set-large: dalli:bin 8.250000 2.100000 10.350000 ( 13.370233)
67
- set-large: libm:ascii 0.890000 1.460000 2.350000 ( 6.069504)
68
- set-large: libm:ascii:pipeline 0.570000 0.450000 1.020000 ( 1.232906)
69
- set-large: libm:ascii:udp 0.730000 0.850000 1.580000 ( 4.174216)
70
- set-large: libm:bin 0.760000 1.510000 2.270000 ( 5.966586)
71
- set-large: libm:bin:buffer 0.530000 0.700000 1.230000 ( 2.419153)
72
- set-large: mclient:ascii 13.540000 4.250000 17.790000 ( 18.447711)
73
- set-large: stash:bin 6.100000 1.500000 7.600000 ( 11.216811)
74
-
75
- get-large: cache:dalli:bin 8.000000 2.480000 10.480000 ( 13.450322)
76
- get-large: cache:libm:bin 6.820000 1.490000 8.310000 ( 12.331486)
77
- get-large: dalli:bin 7.670000 2.490000 10.160000 ( 13.148162)
78
- get-large: libm:ascii 1.740000 1.540000 3.280000 ( 7.256110)
79
- get-large: libm:ascii:pipeline 1.870000 1.960000 3.830000 ( 7.723493)
80
- get-large: libm:ascii:udp 1.560000 0.980000 2.540000 ( 4.823281)
81
- get-large: libm:bin 1.590000 1.590000 3.180000 ( 7.018376)
82
- get-large: libm:bin:buffer 1.730000 1.960000 3.690000 ( 7.365047)
83
- get-large: mclient:ascii 17.160000 4.890000 22.050000 ( 22.647077)
84
- get-large: stash:bin 3.290000 1.440000 4.730000 ( 7.950154)
85
-
86
- hash:jenkins 0.550000 0.000000 0.550000 ( 0.561738)
87
- hash:default 0.550000 0.000000 0.550000 ( 0.553209)
88
- hash:crc 0.660000 0.000000 0.660000 ( 0.657155)
89
- hash:fnv1_32 0.530000 0.010000 0.540000 ( 0.529303)
90
- hash:hsieh 0.280000 0.000000 0.280000 ( 0.281685)
91
- hash:fnv1_64 1.160000 0.000000 1.160000 ( 1.169524)
92
- hash:none 0.310000 0.000000 0.310000 ( 0.313095)
93
- hash:murmur 0.450000 0.000000 0.450000 ( 0.454460)
94
- hash:md5 0.950000 0.010000 0.960000 ( 0.949226)
95
- hash:fnv1a_64 0.590000 0.000000 0.590000 ( 0.590362)
96
- hash:fnv1a_32 0.590000 0.000000 0.590000 ( 0.599005)
97
-
98
-
99
- # sabshere 2/22/11 v0.0.3
100
-
101
- vidalia:~/github/cache (master) $ ruby test/profile/benchmark.rb
102
- Darwin vidalia 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386
103
- ruby 1.8.7 (2010-05-25 patchlevel 266) [i686-darwin9.8.0]
104
- RUBY_VERSION=ruby-1.8.7-head
105
- Ruby 1.8.7p266
106
- Loaded memcached 1.0.6
107
- Loaded remix-stash 1.1.3
108
- Loaded memcache-client 1.8.5
109
- Loaded cache 0.0.3
110
- Loaded kgio 2.3.2
111
- Loaded dalli 1.0.2
112
- Loops is 20000
113
- Stack depth is 0
114
- Small value size is: 13 bytes
115
- Large value size is: 4158 bytes
116
- No matching processes belonging to you were found
117
- user system total real
118
- set: cache:dalli:bin 6.020000 1.890000 7.910000 ( 10.568499)
119
- set: cache:libm:bin 1.460000 1.280000 2.740000 ( 6.112829)
120
- set: dalli:bin 5.640000 1.870000 7.510000 ( 10.215219)
121
- set: libm:ascii 0.820000 1.320000 2.140000 ( 5.446435)
122
- set: libm:ascii:pipeline 0.360000 0.010000 0.370000 ( 0.378485)
123
- set: libm:ascii:udp 0.700000 0.720000 1.420000 ( 3.659001)
124
- set: libm:bin 0.720000 1.340000 2.060000 ( 5.364179)
125
- set: libm:bin:buffer 0.300000 0.120000 0.420000 ( 1.105467)
126
- set: mclient:ascii 10.860000 3.820000 14.680000 ( 15.175516)
127
- set: stash:bin 3.700000 1.350000 5.050000 ( 8.229477)
128
-
129
- get: cache:dalli:bin 6.130000 2.070000 8.200000 ( 10.683650)
130
- get: cache:libm:bin 1.440000 1.230000 2.670000 ( 5.908044)
131
- get: dalli:bin 5.800000 2.080000 7.880000 ( 10.324650)
132
- get: libm:ascii 0.970000 1.320000 2.290000 ( 5.582769)
133
- get: libm:ascii:pipeline 1.050000 1.580000 2.630000 ( 5.956804)
134
- get: libm:ascii:udp 0.820000 0.720000 1.540000 ( 3.605324)
135
- get: libm:bin 0.820000 1.340000 2.160000 ( 5.329828)
136
- get: libm:bin:buffer 0.940000 1.630000 2.570000 ( 5.748327)
137
- get: mclient:ascii 12.900000 3.860000 16.760000 ( 17.249089)
138
- get: stash:bin 3.360000 1.320000 4.680000 ( 7.949412)
139
-
140
- delete: cache:dalli:bin 5.610000 2.100000 7.710000 ( 10.029324)
141
- delete: cache:libm:bin 2.030000 1.370000 3.400000 ( 6.651471)
142
- delete: dalli:bin 5.230000 2.110000 7.340000 ( 9.676535)
143
- delete: libm:ascii 1.790000 1.380000 3.170000 ( 6.550488)
144
- delete: libm:ascii:pipeline 0.570000 0.650000 1.220000 ( 1.346079)
145
- delete: libm:ascii:udp 1.650000 0.870000 2.520000 ( 4.527372)
146
- delete: libm:bin 1.730000 1.390000 3.120000 ( 6.469119)
147
- delete: libm:bin:buffer 0.480000 0.550000 1.030000 ( 1.773955)
148
- delete: mclient:ascii 10.890000 3.930000 14.820000 ( 15.286474)
149
- delete:stash:bin => #<NoMethodError: undefined method `delete' for #<Remix::Stash:0x11cc360>>
150
-
151
- get-missing: cache:dalli:bin 5.970000 2.260000 8.230000 ( 10.874274)
152
- get-missing: cache:libm:bin 2.470000 1.580000 4.050000 ( 7.471236)
153
- get-missing: dalli:bin 5.550000 2.230000 7.780000 ( 10.420783)
154
- get-missing: libm:ascii 2.080000 1.560000 3.640000 ( 7.186221)
155
- get-missing: libm:ascii:pipeline 2.160000 1.890000 4.050000 ( 7.482394)
156
- get-missing: libm:ascii:udp 1.850000 0.930000 2.780000 ( 4.956340)
157
- get-missing: libm:bin 2.030000 1.470000 3.500000 ( 7.022853)
158
- get-missing: libm:bin:buffer 2.090000 1.890000 3.980000 ( 7.314636)
159
- get-missing: mclient:ascii 11.500000 4.010000 15.510000 ( 16.029498)
160
- get-missing: stash:bin 3.280000 1.390000 4.670000 ( 7.834190)
161
-
162
- set-large: cache:dalli:bin 8.070000 2.080000 10.150000 ( 13.126027)
163
- set-large: cache:libm:bin 2.530000 1.410000 3.940000 ( 7.636479)
164
- set-large: dalli:bin 7.650000 2.070000 9.720000 ( 12.691443)
165
- set-large: libm:ascii 0.930000 1.420000 2.350000 ( 6.066637)
166
- set-large: libm:ascii:pipeline 0.640000 0.450000 1.090000 ( 1.279625)
167
- set-large: libm:ascii:udp 0.820000 0.860000 1.680000 ( 4.318411)
168
- set-large: libm:bin 0.810000 1.450000 2.260000 ( 5.870205)
169
- set-large: libm:bin:buffer 0.590000 0.660000 1.250000 ( 2.492524)
170
- set-large: mclient:ascii 12.290000 4.120000 16.410000 ( 17.042205)
171
- set-large: stash:bin 5.810000 1.430000 7.240000 ( 10.615813)
172
-
173
- get-large: cache:dalli:bin 7.680000 2.460000 10.140000 ( 13.286558)
174
- get-large: cache:libm:bin 6.530000 1.500000 8.030000 ( 11.980532)
175
- get-large: dalli:bin 7.240000 2.460000 9.700000 ( 12.743058)
176
- get-large: libm:ascii 1.610000 1.540000 3.150000 ( 7.086940)
177
- get-large: libm:ascii:pipeline 1.720000 1.890000 3.610000 ( 7.410838)
178
- get-large: libm:ascii:udp 1.420000 0.960000 2.380000 ( 4.688834)
179
- get-large: libm:bin 1.440000 1.590000 3.030000 ( 6.935013)
180
- get-large: libm:bin:buffer 1.600000 1.920000 3.520000 ( 7.278831)
181
- get-large: mclient:ascii 15.700000 4.800000 20.500000 ( 21.276235)
182
- get-large: stash:bin 3.580000 1.420000 5.000000 ( 8.259296)
183
-
184
- hash:hsieh 0.310000 0.000000 0.310000 ( 0.314801)
185
- hash:none 0.320000 0.000000 0.320000 ( 0.317238)
186
- hash:default 0.610000 0.000000 0.610000 ( 0.627191)
187
- hash:fnv1_64 1.270000 0.010000 1.280000 ( 1.274384)
188
- hash:md5 1.070000 0.000000 1.070000 ( 1.080698)
189
- hash:murmur 0.560000 0.000000 0.560000 ( 0.570058)
190
- hash:fnv1a_64 0.690000 0.000000 0.690000 ( 0.701543)
191
- hash:fnv1a_32 0.680000 0.010000 0.690000 ( 0.684682)
192
- hash:jenkins 0.660000 0.000000 0.660000 ( 0.668542)
193
- hash:crc 0.660000 0.000000 0.660000 ( 0.665331)
194
- hash:fnv1_32 0.630000 0.000000 0.630000 ( 0.636520)
195
- vidalia:~/github/cache (master) $
196
-
197
- # sabshere 2/22/11 v0.0.2
198
-
199
- Darwin vidalia 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386
200
- ruby 1.8.7 (2010-05-25 patchlevel 266) [i686-darwin9.8.0]
201
- RUBY_VERSION=ruby-1.8.7-head
202
- Ruby 1.8.7p266
203
- Loaded memcached 1.0.6
204
- Loaded remix-stash 1.1.3
205
- Loaded memcache-client 1.8.5
206
- Loaded cache 0.0.2
207
- Loaded kgio 2.3.2
208
- Loaded dalli 1.0.2
209
- Loops is 20000
210
- Stack depth is 0
211
- Small value size is: 13 bytes
212
- Large value size is: 4158 bytes
213
- No matching processes belonging to you were found
214
- user system total real
215
- set: cache:dalli:bin 6.340000 1.880000 8.220000 ( 10.948888)
216
- set: cache:libm:bin 5.730000 1.530000 7.260000 ( 10.640067)
217
- set: dalli:bin 5.580000 1.860000 7.440000 ( 10.092303)
218
- set: libm:ascii 0.840000 1.290000 2.130000 ( 5.445700)
219
- set: libm:ascii:pipeline 0.340000 0.020000 0.360000 ( 0.362669)
220
- set: libm:ascii:udp 0.710000 0.710000 1.420000 ( 3.642532)
221
- set: libm:bin 0.710000 1.320000 2.030000 ( 5.339189)
222
- set: libm:bin:buffer 0.300000 0.110000 0.410000 ( 1.107518)
223
- set: mclient:ascii 10.700000 3.670000 14.370000 ( 14.945212)
224
- set: stash:bin 3.710000 1.370000 5.080000 ( 8.162312)
225
-
226
- get: cache:dalli:bin 6.820000 2.080000 8.900000 ( 11.412364)
227
- get: cache:libm:bin 5.670000 1.490000 7.160000 ( 10.392625)
228
- get: dalli:bin 5.840000 2.090000 7.930000 ( 10.308551)
229
- get: libm:ascii 0.970000 1.310000 2.280000 ( 5.562719)
230
- get: libm:ascii:pipeline 1.060000 1.620000 2.680000 ( 5.881988)
231
- get: libm:ascii:udp 0.820000 0.720000 1.540000 ( 3.585481)
232
- get: libm:bin 0.810000 1.330000 2.140000 ( 5.310565)
233
- get: libm:bin:buffer 0.940000 1.630000 2.570000 ( 5.677996)
234
- get: mclient:ascii 12.680000 3.690000 16.370000 ( 16.930786)
235
- get: stash:bin 3.390000 1.370000 4.760000 ( 7.658067)
236
-
237
- delete: cache:dalli:bin 6.190000 2.080000 8.270000 ( 10.697357)
238
- delete: cache:libm:bin 6.080000 1.580000 7.660000 ( 10.938304)
239
- delete: dalli:bin 5.190000 2.080000 7.270000 ( 9.694417)
240
- delete: libm:ascii 1.790000 1.400000 3.190000 ( 6.452993)
241
- delete: libm:ascii:pipeline 0.550000 0.620000 1.170000 ( 1.226934)
242
- delete: libm:ascii:udp 1.620000 0.870000 2.490000 ( 4.440414)
243
- delete: libm:bin 1.720000 1.400000 3.120000 ( 6.322207)
244
- delete: libm:bin:buffer 0.460000 0.520000 0.980000 ( 1.651911)
245
- delete: mclient:ascii 10.610000 3.700000 14.310000 ( 14.815498)
246
- delete:stash:bin => #<NoMethodError: undefined method `delete' for #<Remix::Stash:0x122e984>>
247
-
248
- get-missing: cache:dalli:bin 6.300000 2.110000 8.410000 ( 10.962403)
249
- get-missing: cache:libm:bin 7.090000 1.780000 8.870000 ( 12.435441)
250
- get-missing: dalli:bin 5.730000 2.260000 7.990000 ( 10.758698)
251
- get-missing: libm:ascii 2.070000 1.550000 3.620000 ( 7.211442)
252
- get-missing: libm:ascii:pipeline 2.190000 1.920000 4.110000 ( 7.549889)
253
- get-missing: libm:ascii:udp 1.820000 0.930000 2.750000 ( 4.887171)
254
- get-missing: libm:bin 1.990000 1.510000 3.500000 ( 6.837518)
255
- get-missing: libm:bin:buffer 2.050000 1.830000 3.880000 ( 7.134244)
256
- get-missing: mclient:ascii 11.160000 3.790000 14.950000 ( 15.550381)
257
- get-missing: stash:bin 3.240000 1.390000 4.630000 ( 7.602964)
258
-
259
- set-large: cache:dalli:bin 8.160000 2.010000 10.170000 ( 13.146422)
260
- set-large: cache:libm:bin 6.490000 1.610000 8.100000 ( 11.726796)
261
- set-large: dalli:bin 7.490000 2.030000 9.520000 ( 12.402519)
262
- set-large: libm:ascii 0.920000 1.400000 2.320000 ( 5.925636)
263
- set-large: libm:ascii:pipeline 0.630000 0.450000 1.080000 ( 1.246708)
264
- set-large: libm:ascii:udp 0.790000 0.820000 1.610000 ( 4.095793)
265
- set-large: libm:bin 0.810000 1.440000 2.250000 ( 5.770076)
266
- set-large: libm:bin:buffer 0.570000 0.640000 1.210000 ( 2.286722)
267
- set-large: mclient:ascii 11.940000 3.910000 15.850000 ( 17.592266)
268
- set-large: stash:bin 6.250000 1.510000 7.760000 ( 13.191809)
269
-
270
- get-large: cache:dalli:bin 8.320000 2.460000 10.780000 ( 13.958967)
271
- get-large: cache:libm:bin 10.740000 1.760000 12.500000 ( 16.610462)
272
- get-large: dalli:bin 7.270000 2.460000 9.730000 ( 12.867557)
273
- get-large: libm:ascii 1.590000 1.540000 3.130000 ( 7.126347)
274
- get-large: libm:ascii:pipeline 1.700000 1.900000 3.600000 ( 7.440423)
275
- get-large: libm:ascii:udp 1.420000 0.950000 2.370000 ( 4.683143)
276
- get-large: libm:bin 1.440000 1.580000 3.020000 ( 6.955872)
277
- get-large: libm:bin:buffer 1.550000 1.920000 3.470000 ( 7.199426)
278
- get-large: mclient:ascii 15.460000 4.560000 20.020000 ( 20.855362)
279
- get-large: stash:bin 3.610000 1.450000 5.060000 ( 8.103802)
280
-
281
- hash:jenkins 0.660000 0.010000 0.670000 ( 0.660554)
282
- hash:hsieh 0.310000 0.000000 0.310000 ( 0.323458)
283
- hash:default 0.620000 0.000000 0.620000 ( 0.616587)
284
- hash:fnv1_32 0.620000 0.000000 0.620000 ( 0.631255)
285
- hash:fnv1_64 1.280000 0.010000 1.290000 ( 1.291580)
286
- hash:none 0.320000 0.000000 0.320000 ( 0.324198)
287
- hash:md5 1.030000 0.000000 1.030000 ( 1.046663)
288
- hash:murmur 0.560000 0.010000 0.570000 ( 0.574408)
289
- hash:fnv1a_32 0.660000 0.000000 0.660000 ( 0.670788)
290
- hash:fnv1a_64 0.690000 0.000000 0.690000 ( 0.701477)
291
- hash:crc 0.640000 0.010000 0.650000 ( 0.646991)
292
- vidalia:~/github/memcached (master) $