parent
9cf043ace8
commit
5b55d45601
File diff suppressed because one or more lines are too long
@ -0,0 +1,18 @@
|
||||
package com.luoo.user.util;
|
||||
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class NickNameUtil2Test {
|
||||
@Test
|
||||
public void test() {
|
||||
int total = 10000000;
|
||||
System.out.println("total: " + total);
|
||||
IntStream.range(0, total).parallel().mapToObj(j -> NickNameUtil2.generateRandomString()).limit(10)
|
||||
.forEach(System.out::println);
|
||||
long distinctNickName = IntStream.range(0, total).parallel().mapToObj(j -> NickNameUtil2.generateRandomString())
|
||||
.distinct().count();
|
||||
System.out.println("length: " + 9 + " distinctCount: " + distinctNickName);
|
||||
}
|
||||
}
|
Loading…
Reference in new issue