Skip to content

Commit 17050b5

Browse files
committed
Test: improved document serialization speed test
1 parent fbdea7a commit 17050b5

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

tests/src/test/java/com/orientechnologies/orient/test/database/speed/ODocumentSerializationSpeedTest.java

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,30 @@
2424
public class ODocumentSerializationSpeedTest extends OrientMonoThreadTest {
2525
private ODocument record;
2626

27-
public static void main(String[] iArgs) throws InstantiationException, IllegalAccessException {
28-
ODocumentSerializationSpeedTest test = new ODocumentSerializationSpeedTest();
29-
test.data.go(test);
30-
}
31-
3227
public ODocumentSerializationSpeedTest() throws InstantiationException, IllegalAccessException {
3328
super(1000000);
3429

3530
record = new ODocument();
3631
}
3732

33+
public static void main(String[] iArgs) throws InstantiationException, IllegalAccessException {
34+
ODocumentSerializationSpeedTest test = new ODocumentSerializationSpeedTest();
35+
test.data.go(test);
36+
}
37+
3838
@Override
3939
public void cycle() {
4040
record.reset();
4141
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 });
4551
final byte[] buffer = record.toStream();
4652

4753
record.reset();

0 commit comments

Comments
 (0)