Beispiel #1
0
 public static void _test() {
   // improves logging of these threads.
   AffinitySupport.setThreadId();
   try {
     test();
   } catch (IOException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
   }
 }
Beispiel #2
0
  public static void populate(int n) {
    AffinitySupport.setThreadId();

    long start = System.currentTimeMillis();
    BigDataStuff value = new BigDataStuff(0);
    for (long i = n; i < MAXSIZE; i += 4) {
      if (n == 0 && i % (10 * 1000 * 1000) == 0) {
        System.out.println(
            "Now inserted to "
                + i
                + " seconds since start = "
                + ((System.currentTimeMillis() - start) / 1000L));
      }
      value.x = i;
      value.y.setLength(0);
      value.y.append(i);
      TheSharedMap.put(i, value);
    }
  }