Skip to content
This repository was archived by the owner on May 21, 2024. It is now read-only.

Commit 978f26c

Browse files
bastjanleodido
authored andcommitted
Add UTF-8 + BOM message benchmark
1 parent e6e8f55 commit 978f26c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

rfc5424/performance_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,16 @@ var benchCases = []benchCase{
6868
},
6969
{
7070
label: "[ok] w/o procid, w/o structured data, with message starting with BOM",
71-
input: []byte("<34>1 2003-10-11T22:14:15.003Z mymachine.example.com su - ID47 - \xEF\xBB\xBF'su root' failed for lonvick on /dev/pts/8"),
71+
input: []byte("<34>1 2003-10-11T22:14:15.003Z mymachine.example.com su - ID47 - " + BOM + "'su root' failed for lonvick on /dev/pts/8"),
7272
},
7373
{
7474
label: "[ok] minimal with UTF-8 message",
7575
input: []byte("<0>1 - - - - - - ⠊⠀⠉⠁⠝⠀⠑⠁⠞⠀⠛⠇⠁⠎⠎⠀⠁⠝⠙⠀⠊⠞⠀⠙⠕⠑⠎⠝⠞⠀⠓⠥⠗⠞⠀⠍⠑"),
7676
},
77+
{
78+
label: "[ok] minimal with UTF-8 message starting with BOM",
79+
input: []byte("<0>1 - - - - - - " + BOM + "⠊⠀⠉⠁⠝⠀⠑⠁⠞⠀⠛⠇⠁⠎⠎⠀⠁⠝⠙⠀⠊⠞⠀⠙⠕⠑⠎⠝⠞⠀⠓⠥⠗⠞⠀⠍⠑"),
80+
},
7781
{
7882
label: "[ok] with structured data id, w/o structured data params",
7983
input: []byte(`<29>50 2016-01-15T01:00:43Z hn S - - [my@id]`),

0 commit comments

Comments
 (0)