### Question:
GUIDGenerator { public static String createStringTypeGUID() { return HEX_IPV4_ADDR + RANDOM_SEED + Long.toHexString(System.currentTimeMillis()) + hexCycleSequence(); }  static String createStringTypeGUID(); static long createLongTypeGUID(); static long createLongTypeGUID(int ipDigits); static long createLongTypeGUIDBySvrId(int svrId);  }### Answer:
@Test public void testCreateStringTypeGUIDBasic() throws Exception { for (int i = 0; i < 10; i++) { System.out.println(GUIDGenerator.createStringTypeGUID()); } for (int i = 0; i < 0xFFFFF; i++) { GUIDGenerator.createStringTypeGUID(); } }
@Test public void testCreateStringTypeGUIDPerformance() throws Exception { int n = Runtime.getRuntime().availableProcessors() * 3; CountDownLatch latch = new CountDownLatch(n); long target = 10000000; long begin = System.currentTimeMillis(); for (int i = 0; i < target * 10; i++) { GUIDGenerator.createStringTypeGUID(); } System.out.println("cost time:" + (System.currentTimeMillis() - begin) + " ms"); begin = System.currentTimeMillis(); for (int i = 0 ; i < n ; i++) { Worker worker = new Worker(latch,target); worker.start(); } latch.await(); System.out.println("cost time:" + (System.currentTimeMillis() - begin) + " ms"); }