memcached 0.10 → 0.11
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/CHANGELOG +4 -2
- data/COMPATIBILITY +1 -0
- data/Manifest +1 -1
- data/README +4 -4
- data/Rakefile +30 -0
- data/TODO +3 -3
- data/ext/rlibmemcached.i +20 -37
- data/ext/rlibmemcached_wrap.c +815 -799
- data/lib/memcached.rb +4 -0
- data/lib/memcached/behaviors.rb +8 -7
- data/lib/memcached/memcached.rb +53 -76
- data/lib/memcached/rails.rb +1 -1
- data/memcached.gemspec +103 -56
- data/test/profile/benchmark.rb +1 -1
- data/test/profile/profile.rb +1 -1
- data/test/profile/valgrind.rb +1 -1
- data/test/unit/memcached_test.rb +136 -121
- data/test/unit/rails_test.rb +1 -1
- metadata +17 -8
- metadata.gz.sig +0 -0
- data/test/profile/key.rb +0 -41
data/test/unit/rails_test.rb
CHANGED
@@ -5,7 +5,7 @@ class RailsTest < Test::Unit::TestCase
|
|
5
5
|
|
6
6
|
def setup
|
7
7
|
@servers = ['127.0.0.1:43042', '127.0.0.1:43043']
|
8
|
-
@namespace = '
|
8
|
+
@namespace = 'rails_test'
|
9
9
|
@cache = Memcached::Rails.new(@servers, :namespace => @namespace)
|
10
10
|
@value = OpenStruct.new(:a => 1, :b => 2, :c => GenericClass)
|
11
11
|
@marshalled_value = Marshal.dump(@value)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: memcached
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: "0.
|
4
|
+
version: "0.11"
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Evan Weaver
|
@@ -30,10 +30,19 @@ cert_chain:
|
|
30
30
|
yZ0=
|
31
31
|
-----END CERTIFICATE-----
|
32
32
|
|
33
|
-
date: 2008-
|
33
|
+
date: 2008-07-14 00:00:00 -04:00
|
34
34
|
default_executable:
|
35
|
-
dependencies:
|
36
|
-
|
35
|
+
dependencies:
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: echoe
|
38
|
+
type: :development
|
39
|
+
version_requirement:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
requirements:
|
42
|
+
- - ">="
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: "0"
|
45
|
+
version:
|
37
46
|
description: An interface to the libmemcached C client.
|
38
47
|
email: ""
|
39
48
|
executables: []
|
@@ -67,9 +76,9 @@ files:
|
|
67
76
|
- lib/memcached.rb
|
68
77
|
- LICENSE
|
69
78
|
- Manifest
|
79
|
+
- Rakefile
|
70
80
|
- README
|
71
81
|
- test/profile/benchmark.rb
|
72
|
-
- test/profile/key.rb
|
73
82
|
- test/profile/profile.rb
|
74
83
|
- test/profile/valgrind.rb
|
75
84
|
- test/setup.rb
|
@@ -101,14 +110,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
101
110
|
version:
|
102
111
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
103
112
|
requirements:
|
104
|
-
- - "
|
113
|
+
- - "="
|
105
114
|
- !ruby/object:Gem::Version
|
106
|
-
version: "
|
115
|
+
version: "1.2"
|
107
116
|
version:
|
108
117
|
requirements: []
|
109
118
|
|
110
119
|
rubyforge_project: fauna
|
111
|
-
rubygems_version: 1.
|
120
|
+
rubygems_version: 1.2.0
|
112
121
|
signing_key:
|
113
122
|
specification_version: 2
|
114
123
|
summary: An interface to the libmemcached C client.
|
metadata.gz.sig
CHANGED
Binary file
|
data/test/profile/key.rb
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
|
2
|
-
HERE = File.dirname(__FILE__)
|
3
|
-
$LOAD_PATH << "#{HERE}/../../lib/"
|
4
|
-
|
5
|
-
require 'rubygems'
|
6
|
-
require 'memcached'
|
7
|
-
require 'ruby-prof'
|
8
|
-
require 'benchmark'
|
9
|
-
|
10
|
-
KEYS = ["ch\303\242teau"*10, "long"*100, "spaces space spaces", "null \000"]
|
11
|
-
|
12
|
-
@namespace = "benchmark_namespace"
|
13
|
-
@cache = Memcached.new(
|
14
|
-
['127.0.0.1:43042', '127.0.0.1:43043'],
|
15
|
-
:namespace => @namespace
|
16
|
-
)
|
17
|
-
|
18
|
-
def dispatch(n, k)
|
19
|
-
Rlibmemcached.ns(@namespace, key)
|
20
|
-
end
|
21
|
-
|
22
|
-
#result = RubyProf.profile do
|
23
|
-
Benchmark.bm(15) do |x|
|
24
|
-
x.report("direct") do
|
25
|
-
KEYS.each do |key|
|
26
|
-
10000.times do
|
27
|
-
Rlibmemcached.ns(@namespace, key)
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
x.report("dispatch") do
|
32
|
-
KEYS.each do |key|
|
33
|
-
10000.times do
|
34
|
-
Rlibmemcached.ns(@namespace, key)
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
#printer = RubyProf::GraphPrinter.new(result)
|
41
|
-
#printer.print(STDOUT, 0)
|