Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Changeset 3542

Show
Ignore:
Timestamp:
06/02/08 21:32:33 (6 months ago)
Author:
kris
Message:

changing keys in order to use all available cache instances

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/example/cluster/cclient.d

    r3485 r3542  
    1515import tango.net.cluster.tina.Cluster; 
    1616 
     17import Integer = tango.text.convert.Integer; 
     18 
    1719/******************************************************************************* 
    1820 
     
    2931           auto cache   = new NetworkCache (cluster, "my.cache.channel"); 
    3032 
     33           char[64] tmp; 
    3134           while (true) 
    3235                 { 
    3336                 w.start; 
    3437                 for (int i=10000; i--;) 
    35                       cache.put ("key", cache.EmptyMessage); 
     38                     { 
     39                     auto key = Integer.format (tmp, i); 
     40                     cache.put (key, cache.EmptyMessage); 
     41                     } 
    3642 
    3743                 Stdout.formatln ("{} put/s", 10000/w.stop); 
     
    3945                 w.start; 
    4046                 for (int i=10000; i--;) 
    41                       cache.get ("key"); 
     47                     { 
     48                     auto key = Integer.format (tmp, i); 
     49                     cache.get (key); 
     50                     } 
    4251         
    4352                 Stdout.formatln ("{} get/s", 10000/w.stop);