<div>hi all, </div>
<div>&nbsp;</div>
<div>any help and / or info is very appreciated but I think you aggree with me that something is running wrong here.</div>
<div>&nbsp;</div>
<div>i have some trouble to get started. everybody is talking about millions of objects here but when i&#39;m running a loop with around 10000 objects i get the following results.</div>
<div>&nbsp;</div>
<div>[i&#39;m running this on my XP client.]</div>
<div>&nbsp;</div>
<div>10000 gets: 00:00:07.4687978ms<br><font size="4"><strong>Cache hits: 720<br><font color="#ff0000">Cache misses: 9280</font></strong><br></font></div>
<div><a href="http://192.168.212.21:11211">192.168.212.21:11211</a><br>time:1168282144<br>total_items:10000<br>connection_structures:5<br>version:1.2.1<br>limit_maxbytes:67108864<br>cmd_get:10000<br>bytes_written:23744040
<br>total_connections:5<br>bytes:23633480<br>get_misses:9280<br>pointer_size:32<br>uptime:132<br>curr_connections:4<br>pid:41848<br>bytes_read:328138807<br>get_hits:720<br>cmd_set:10000<br>curr_items:720</div>
<div>&nbsp;</div>
<div>i&#39;m starting the memcached like that:</div>
<div>&nbsp;</div>
<div><strong>memcached.exe -d start -m 2048 -l <a href="http://192.168.212.21">192.168.212.21</a> -p 11211</strong></div>
<div>&nbsp;</div>
<div>here are some extracted code from my adapted benchmark code:</div>
<div>&nbsp;</div>
<div><font color="#0000ff" size="2">
<p>for</p></font><font size="2">(</font><font color="#0000ff" size="2">int</font><font size="2"> i = start; i &lt; start+runs; i++) 
<p>{ </p>
<p></p></font><font color="#008080" size="2">XPath</font><font size="2"> x = </font><font color="#0000ff" size="2">new</font><font size="2"> </font><font color="#008080" size="2">XPath</font><font size="2">();
<p>x.Text = x.Child1.Text = x.Child2.Text = obj;</p>
<p>x.Sum = x.Child1.Sum = x.Child2.Sum = 5;</p>
<p>x.SumLong = x.Child1.SumLong = x.Child2.SumLong = </p></font><font color="#008080" size="2">DateTime</font><font size="2">.Now.Ticks;
<p>mc.Set(keyBase + i, x);</p>
<p>}</p></font></div>
<div>// some additional code</div>
<div>&nbsp;</div>
<div><font color="#0000ff" size="2">
<p>for</p></font><font size="2">(</font><font color="#0000ff" size="2">int</font><font size="2"> i = start; i &lt; start+runs; i++) 
<p>{</p>
<p></p></font><font color="#008080" size="2">XPath</font><font size="2"> s = (</font><font color="#008080" size="2">XPath</font><font size="2">) mc.Get(keyBase +i.ToString());
<p></p></font><font color="#008000" size="2">// string str = (string) mc.Get(keyBase + i);</font><font size="2">
<p></p></font><font color="#0000ff" size="2">if</font><font size="2"> (s != </font><font color="#0000ff" size="2">null</font><font size="2">)
<p>{</p>
<p>++hits;</p>
<p>s.TestMethod();</p>
<p>}</p>
<p></p></font><font color="#0000ff" size="2">else</font><font size="2">
<p>++misses;</p>
<p>}</p>
<p>.... etc.</p>
<p></p></font><strong>and this is like my sample class looks like (xpathchild 1 + 2 are quite the same)</strong></div>
<div><font size="2">
<p>[</p></font><font color="#008080" size="2">Serializable</font><font size="2">]
<p></p></font><font color="#0000ff" size="2">public</font><font size="2"> </font><font color="#0000ff" size="2">class</font><font size="2"> </font><font color="#008080" size="2">XPath</font><font size="2">
<p>{</p>
<p></p></font><font color="#0000ff" size="2">public</font><font size="2"> XPath()
<p>{</p>
<p></p></font><font color="#0000ff" size="2">this</font><font size="2">.child1 = </font><font color="#0000ff" size="2">new</font><font size="2"> </font><font color="#008080" size="2">XPathChild1</font><font size="2">();
<p></p></font><font color="#0000ff" size="2">this</font><font size="2">.child2 = </font><font color="#0000ff" size="2">new</font><font size="2"> </font><font color="#008080" size="2">XPathChild2</font><font size="2">();
<p></p>
<p></p></font><font color="#0000ff" size="2">for</font><font size="2">(</font><font color="#0000ff" size="2">int</font><font size="2"> i=0; i &lt; 500;++i)
<p>{</p>
<p>list1.Add(</p></font><font color="#0000ff" size="2">new</font><font size="2"> </font><font color="#008080" size="2">XPathChild1</font><font size="2">());
<p>list2.Add(</p></font><font color="#0000ff" size="2">new</font><font size="2"> </font><font color="#008080" size="2">XPathChild2</font><font size="2">());
<p>}</p>
<p></p>
<p>}</p>
<p></p>
<p></p></font><font color="#0000ff" size="2">public</font><font size="2"> </font><font color="#008080" size="2">List</font><font size="2">&lt;</font><font color="#008080" size="2">XPathChild1</font><font size="2">&gt; list1 = 
</font><font color="#0000ff" size="2">new</font><font size="2"> </font><font color="#008080" size="2">List</font><font size="2">&lt;</font><font color="#008080" size="2">XPathChild1</font><font size="2">&gt;();
<p></p></font><font color="#0000ff" size="2">public</font><font size="2"> </font><font color="#008080" size="2">List</font><font size="2">&lt;</font><font color="#008080" size="2">XPathChild2</font><font size="2">&gt; list2 = 
</font><font color="#0000ff" size="2">new</font><font size="2"> </font><font color="#008080" size="2">List</font><font size="2">&lt;</font><font color="#008080" size="2">XPathChild2</font><font size="2">&gt;();
<p></p></font><font color="#0000ff" size="2">
<p>#region</p></font><font size="2"> Property: Child1
<p></p></font><font color="#0000ff" size="2">private</font><font size="2"> </font><font color="#008080" size="2">XPathChild1</font><font size="2"> child1;
<p></p>
<p></p></font><font color="#808080" size="2">///</font><font color="#008000" size="2"> </font><font color="#808080" size="2">&lt;summary&gt;</font><font size="2">
<p></p></font><font color="#808080" size="2">///</font><font color="#008000" size="2"> Gets/sets the Child1</font><font size="2">
<p></p></font><font color="#808080" size="2">///</font><font color="#008000" size="2"> </font><font color="#808080" size="2">&lt;/summary&gt;</font><font size="2">
<p></p></font><font color="#0000ff" size="2">public</font><font size="2"> </font><font color="#008080" size="2">XPathChild1</font><font size="2"> Child1
<p>{</p>
<p>[System.Diagnostics.</p></font><font color="#008080" size="2">DebuggerStepThrough</font><font size="2">]
<p></p></font><font color="#0000ff" size="2">get</font><font size="2"> { </font><font color="#0000ff" size="2">return</font><font size="2"> </font><font color="#0000ff" size="2">this</font><font size="2">.child1; }
<p></p>
<p>[System.Diagnostics.</p></font><font color="#008080" size="2">DebuggerStepThrough</font><font size="2">]
<p></p></font><font color="#0000ff" size="2">set</font><font size="2"> { </font><font color="#0000ff" size="2">this</font><font size="2">.child1 = </font><font color="#0000ff" size="2">value</font><font size="2">; }
<p>}</p></font><font color="#0000ff" size="2">
<p>#endregion</p></font><font size="2">
<p></p></font><font color="#0000ff" size="2">
<p>#region</p></font><font size="2"> Property: Child2
<p></p></font><font color="#0000ff" size="2">private</font><font size="2"> </font><font color="#008080" size="2">XPathChild2</font><font size="2"> child2;
<p></p>
<p></p></font><font color="#808080" size="2">///</font><font color="#008000" size="2"> </font><font color="#808080" size="2">&lt;summary&gt;</font><font size="2">
<p></p></font><font color="#808080" size="2">///</font><font color="#008000" size="2"> Gets/sets the Child2</font><font size="2">
<p></p></font><font color="#808080" size="2">///</font><font color="#008000" size="2"> </font><font color="#808080" size="2">&lt;/summary&gt;</font><font size="2">
<p></p></font><font color="#0000ff" size="2">public</font><font size="2"> </font><font color="#008080" size="2">XPathChild2</font><font size="2"> Child2
<p>{</p>
<p>[System.Diagnostics.</p></font><font color="#008080" size="2">DebuggerStepThrough</font><font size="2">]
<p></p></font><font color="#0000ff" size="2">get</font><font size="2"> { </font><font color="#0000ff" size="2">return</font><font size="2"> </font><font color="#0000ff" size="2">this</font><font size="2">.child2; }
<p></p>
<p>[System.Diagnostics.</p></font><font color="#008080" size="2">DebuggerStepThrough</font><font size="2">]
<p></p></font><font color="#0000ff" size="2">set</font><font size="2"> { </font><font color="#0000ff" size="2">this</font><font size="2">.child2 = </font><font color="#0000ff" size="2">value</font><font size="2">; }
<p>}</p></font><font color="#0000ff" size="2">
<p>#endregion</p></font><font size="2">
<p></p></font><font color="#0000ff" size="2">
<p>#region</p></font><font size="2"> Property: Text
<p></p></font><font color="#0000ff" size="2">private</font><font size="2"> </font><font color="#0000ff" size="2">string</font><font size="2"> text;
<p></p>
<p></p></font><font color="#808080" size="2">///</font><font color="#008000" size="2"> </font><font color="#808080" size="2">&lt;summary&gt;</font><font size="2">
<p></p></font><font color="#808080" size="2">///</font><font color="#008000" size="2"> Gets/sets the Text</font><font size="2">
<p></p></font><font color="#808080" size="2">///</font><font color="#008000" size="2"> </font><font color="#808080" size="2">&lt;/summary&gt;</font><font size="2">
<p></p></font><font color="#0000ff" size="2">public</font><font size="2"> </font><font color="#0000ff" size="2">string</font><font size="2"> Text
<p>{</p>
<p>[System.Diagnostics.</p></font><font color="#008080" size="2">DebuggerStepThrough</font><font size="2">]
<p></p></font><font color="#0000ff" size="2">get</font><font size="2"> { </font><font color="#0000ff" size="2">return</font><font size="2"> </font><font color="#0000ff" size="2">this</font><font size="2">.text; }
<p></p>
<p>[System.Diagnostics.</p></font><font color="#008080" size="2">DebuggerStepThrough</font><font size="2">]
<p></p></font><font color="#0000ff" size="2">set</font><font size="2"> { </font><font color="#0000ff" size="2">this</font><font size="2">.text = </font><font color="#0000ff" size="2">value</font><font size="2">; }
<p>}</p></font><font color="#0000ff" size="2">
<p>#endregion</p></font><font size="2">
<p></p></font><font color="#0000ff" size="2">
<p>#region</p></font><font size="2"> Property: Sum
<p></p></font><font color="#0000ff" size="2">private</font><font size="2"> </font><font color="#0000ff" size="2">int</font><font size="2"> sum;
<p></p>
<p></p></font><font color="#808080" size="2">///</font><font color="#008000" size="2"> </font><font color="#808080" size="2">&lt;summary&gt;</font><font size="2">
<p></p></font><font color="#808080" size="2">///</font><font color="#008000" size="2"> Gets/sets the Sum</font><font size="2">
<p></p></font><font color="#808080" size="2">///</font><font color="#008000" size="2"> </font><font color="#808080" size="2">&lt;/summary&gt;</font><font size="2">
<p></p></font><font color="#0000ff" size="2">public</font><font size="2"> </font><font color="#0000ff" size="2">int</font><font size="2"> Sum
<p>{</p>
<p>[System.Diagnostics.</p></font><font color="#008080" size="2">DebuggerStepThrough</font><font size="2">]
<p></p></font><font color="#0000ff" size="2">get</font><font size="2"> { </font><font color="#0000ff" size="2">return</font><font size="2"> </font><font color="#0000ff" size="2">this</font><font size="2">.sum; }
<p></p>
<p>[System.Diagnostics.</p></font><font color="#008080" size="2">DebuggerStepThrough</font><font size="2">]
<p></p></font><font color="#0000ff" size="2">set</font><font size="2"> { </font><font color="#0000ff" size="2">this</font><font size="2">.sum = </font><font color="#0000ff" size="2">value</font><font size="2">; }
<p>}</p></font><font color="#0000ff" size="2">
<p>#endregion</p></font><font size="2">
<p></p></font><font color="#0000ff" size="2">
<p>#region</p></font><font size="2"> Property: SumLong
<p></p></font><font color="#0000ff" size="2">private</font><font size="2"> </font><font color="#0000ff" size="2">long</font><font size="2"> sumLong;
<p></p>
<p></p></font><font color="#808080" size="2">///</font><font color="#008000" size="2"> </font><font color="#808080" size="2">&lt;summary&gt;</font><font size="2">
<p></p></font><font color="#808080" size="2">///</font><font color="#008000" size="2"> Gets/sets the SumLong</font><font size="2">
<p></p></font><font color="#808080" size="2">///</font><font color="#008000" size="2"> </font><font color="#808080" size="2">&lt;/summary&gt;</font><font size="2">
<p></p></font><font color="#0000ff" size="2">public</font><font size="2"> </font><font color="#0000ff" size="2">long</font><font size="2"> SumLong
<p>{</p>
<p>[System.Diagnostics.</p></font><font color="#008080" size="2">DebuggerStepThrough</font><font size="2">]
<p></p></font><font color="#0000ff" size="2">get</font><font size="2"> { </font><font color="#0000ff" size="2">return</font><font size="2"> </font><font color="#0000ff" size="2">this</font><font size="2">.sumLong; }
<p></p>
<p>[System.Diagnostics.</p></font><font color="#008080" size="2">DebuggerStepThrough</font><font size="2">]
<p></p></font><font color="#0000ff" size="2">set</font><font size="2"> { </font><font color="#0000ff" size="2">this</font><font size="2">.sumLong = </font><font color="#0000ff" size="2">value</font><font size="2">; }
<p>}</p></font><font color="#0000ff" size="2">
<p>#endregion</p></font><font size="2">
<p></p></font><font color="#0000ff" size="2">public</font><font size="2"> </font><font color="#0000ff" size="2">void</font><font size="2"> TestMethod()
<p>{</p>
<p></p></font><font color="#008080" size="2">Console</font><font size="2">.WriteLine(</font><font color="#800000" size="2">@&quot;Text: &quot;</font><font size="2"> + </font><font color="#0000ff" size="2">this</font><font size="2">
.Text);
<p></p></font><font color="#008080" size="2">Console</font><font size="2">.WriteLine(</font><font color="#800000" size="2">@&quot;Sum: &quot;</font><font size="2"> + </font><font color="#0000ff" size="2">this</font><font size="2">
.Sum.ToString());
<p></p></font><font color="#008080" size="2">Console</font><font size="2">.WriteLine(</font><font color="#800000" size="2">@&quot;SumLong: &quot;</font><font size="2"> + </font><font color="#0000ff" size="2">this</font><font size="2">
.SumLong.ToString());
<p></p></font><font color="#008080" size="2">Console</font><font size="2">.WriteLine(</font><font color="#800000" size="2">@&quot;Child1.GetHashCode: &quot;</font><font size="2"> + </font><font color="#0000ff" size="2">this
</font><font size="2">.Child1.GetHashCode().ToString());
<p></p></font><font color="#008080" size="2">Console</font><font size="2">.WriteLine(</font><font color="#800000" size="2">@&quot;list1.Count: &quot;</font><font size="2"> + </font><font color="#0000ff" size="2">this</font>
<font size="2">.list1.Count.ToString());
<p></p></font><font color="#008080" size="2">Console</font><font size="2">.WriteLine(</font><font color="#800000" size="2">@&quot;Child2.GetHashCode: &quot;</font><font size="2"> + </font><font color="#0000ff" size="2">this
</font><font size="2">.Child2.GetHashCode().ToString());
<p></p></font><font color="#008080" size="2">Console</font><font size="2">.WriteLine(</font><font color="#800000" size="2">@&quot;list2.Count: &quot;</font><font size="2"> + </font><font color="#0000ff" size="2">this</font>
<font size="2">.list2.Count.ToString());
<p></p></font><font color="#008080" size="2">Console</font><font size="2">.WriteLine(</font><font color="#800000" size="2">@&quot;*****************************************&quot;</font><font size="2">);
<p>}</p>
<p></p>
<p>}</p></font></div>
<div><br>-- <br>Kind regards,<br>Roni Schuetz<br><br>do you search flights - <a href="http://www.indeXus.Net/">http://www.indeXus.Net/</a> </div>