|
24 | 24 | public class ODocumentSerializationSpeedTest extends OrientMonoThreadTest {
|
25 | 25 | private ODocument record;
|
26 | 26 |
|
27 |
| - public static void main(String[] iArgs) throws InstantiationException, IllegalAccessException { |
28 |
| - ODocumentSerializationSpeedTest test = new ODocumentSerializationSpeedTest(); |
29 |
| - test.data.go(test); |
30 |
| - } |
31 |
| - |
32 | 27 | public ODocumentSerializationSpeedTest() throws InstantiationException, IllegalAccessException {
|
33 | 28 | super(1000000);
|
34 | 29 |
|
35 | 30 | record = new ODocument();
|
36 | 31 | }
|
37 | 32 |
|
| 33 | + public static void main(String[] iArgs) throws InstantiationException, IllegalAccessException { |
| 34 | + ODocumentSerializationSpeedTest test = new ODocumentSerializationSpeedTest(); |
| 35 | + test.data.go(test); |
| 36 | + } |
| 37 | + |
38 | 38 | @Override
|
39 | 39 | public void cycle() {
|
40 | 40 | record.reset();
|
41 | 41 | record.field("id", data.getCyclesDone());
|
42 |
| - record.field("name", "Luca"); |
43 |
| - record.field("surname", "Garulli"); |
44 |
| - record.field("salary", 3000f); |
| 42 | + for (int i = 0; i < 15; ++i) |
| 43 | + record.field("name" + i, "Luca" + i); |
| 44 | + // record.field("surname", "Garulli"); |
| 45 | + // record.field("salary", 3000f); |
| 46 | + // record.field("double", 3343434d); |
| 47 | + // record.field("int", 23323); |
| 48 | + // record.field("bd", new BigDecimal("12232232.232")); |
| 49 | + // record.field("boolean", true); |
| 50 | + // record.field("bytes", new byte[] { 32, 32, 22, 2, 32, 3, 23, 2, 32 }); |
45 | 51 | final byte[] buffer = record.toStream();
|
46 | 52 |
|
47 | 53 | record.reset();
|
|
0 commit comments