[#2178] Improve FieldList. Avoid creating excessive array lists,
where simple (immutable) Field<?>[] are sufficient - Added benchmark
This commit is contained in:
parent
d51a7b53dc
commit
8573e3d0c5
@ -79,6 +79,7 @@ public class BenchmarkTests<
|
||||
T785 extends TableRecord<T785>>
|
||||
extends BaseTest<A, AP, B, S, B2S, BS, L, X, DATE, BOOL, D, T, U, UU, I, IPK, T725, T639, T785> {
|
||||
|
||||
private static final int REPETITIONS_NEW_RECORD = 1000000;
|
||||
private static final int REPETITIONS_RECORD_INTO = 2000;
|
||||
private static final int REPETITIONS_FIELD_ACCESS = 1000000;
|
||||
private static final int REPETITIONS_SELECT = 100;
|
||||
@ -88,6 +89,15 @@ extends BaseTest<A, AP, B, S, B2S, BS, L, X, DATE, BOOL, D, T, U, UU, I, IPK, T7
|
||||
super(delegate);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBenchmarkNewRecord() throws Exception {
|
||||
Executor create = create();
|
||||
|
||||
for (int i = 0; i < REPETITIONS_NEW_RECORD; i++) {
|
||||
create.newRecord(TBook());
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBenchmarkRecordInto() throws Exception {
|
||||
Result<B> books = create().fetch(TBook());
|
||||
|
||||
@ -1974,6 +1974,11 @@ public abstract class jOOQAbstractTest<
|
||||
new LoaderTests(this).testLoader();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBenchmarkNewRecord() throws Exception {
|
||||
new BenchmarkTests(this).testBenchmarkNewRecord();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBenchmarkRecordInto() throws Exception {
|
||||
new BenchmarkTests(this).testBenchmarkRecordInto();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user