File tree Expand file tree Collapse file tree 3 files changed +20
-7
lines changed
src/main/java/com/fasterxml/jackson/perf Expand file tree Collapse file tree 3 files changed +20
-7
lines changed Original file line number Diff line number Diff line change 4
4
import org .openjdk .jmh .annotations .Scope ;
5
5
6
6
import com .fasterxml .jackson .databind .*;
7
+
7
8
import com .fasterxml .jackson .dataformat .cbor .CBORFactory ;
9
+ import com .fasterxml .jackson .dataformat .cbor .databind .CBORMapper ;
10
+
8
11
import com .fasterxml .jackson .perf .ReadPerfBaseBasicJackson ;
9
12
import com .fasterxml .jackson .perf .data .InputConverter ;
10
13
import com .fasterxml .jackson .perf .model .MediaItem ;
14
17
public class CBORColumnReadVanilla
15
18
extends ReadPerfBaseBasicJackson <MediaItem >
16
19
{
17
- private final static CBORFactory _cf = new CBORFactory ();
20
+ private final static CBORFactory _cf = CBORFactory . builder (). build ();
18
21
19
- private static final ObjectMapper MAPPER = new ObjectMapper (_cf );
22
+ private static final ObjectMapper MAPPER = new CBORMapper (_cf );
20
23
static {
21
24
MAPPER .setAnnotationIntrospector (new AsArrayIntrospector ());
22
25
}
Original file line number Diff line number Diff line change 4
4
import org .openjdk .jmh .annotations .Scope ;
5
5
6
6
import com .fasterxml .jackson .databind .*;
7
+
7
8
import com .fasterxml .jackson .dataformat .cbor .CBORFactory ;
9
+ import com .fasterxml .jackson .dataformat .cbor .databind .CBORMapper ;
10
+
8
11
import com .fasterxml .jackson .perf .ReadPerfBaseFullJackson ;
9
12
import com .fasterxml .jackson .perf .data .InputConverter ;
10
13
import com .fasterxml .jackson .perf .model .MediaItem ;
13
16
public class CBORStdReadVanilla
14
17
extends ReadPerfBaseFullJackson <MediaItem >
15
18
{
16
- private final static CBORFactory _cf = new CBORFactory ();
19
+ private final static CBORFactory _cf = CBORFactory .builder ()
20
+ // .disable(JsonFactory.Feature.CANONICALIZE_FIELD_NAMES)
21
+ .build ();
17
22
18
- private static final ObjectMapper MAPPER = new ObjectMapper (_cf );
23
+ private static final ObjectMapper MAPPER = new CBORMapper (_cf );
19
24
20
25
private final static InputConverter CBORS = InputConverter .stdConverter (MAPPER );
21
26
Original file line number Diff line number Diff line change 4
4
import org .openjdk .jmh .annotations .Scope ;
5
5
6
6
import com .fasterxml .jackson .databind .*;
7
+
7
8
import com .fasterxml .jackson .dataformat .smile .SmileFactory ;
9
+ import com .fasterxml .jackson .dataformat .smile .databind .SmileMapper ;
10
+
8
11
import com .fasterxml .jackson .perf .ReadPerfBaseFullJackson ;
9
12
import com .fasterxml .jackson .perf .data .InputConverter ;
10
13
import com .fasterxml .jackson .perf .model .MediaItem ;
13
16
public class SmileStdReadVanilla
14
17
extends ReadPerfBaseFullJackson <MediaItem >
15
18
{
16
- private final static SmileFactory _sf = new SmileFactory ();
17
-
18
- private static final ObjectMapper MAPPER = new ObjectMapper (_sf );
19
+ private final static SmileFactory _sf = SmileFactory .builder ()
20
+ // .disable(JsonFactory.Feature.CANONICALIZE_FIELD_NAMES)
21
+ .build ();
22
+
23
+ private static final ObjectMapper MAPPER = new SmileMapper (_sf );
19
24
20
25
private final static InputConverter SMILES = InputConverter .stdConverter (MAPPER );
21
26
You can’t perform that action at this time.
0 commit comments