Perf: yyjson replaces cjson
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
include_directories(${PROJECT_SOURCE_DIR}/deps/)
|
||||
aux_source_directory(${PROJECT_SOURCE_DIR}/deps/toml DEPS_SRC)
|
||||
aux_source_directory(${PROJECT_SOURCE_DIR}/deps/yyjson DEPS_SRC)
|
||||
|
||||
add_library(${PROJECT_NAME}_test_plug SHARED dns_decoder_test.cpp ${DEPS_SRC})
|
||||
add_dependencies(${PROJECT_NAME}_test_plug ${PROJECT_NAME})
|
||||
|
||||
@@ -457,7 +457,7 @@
|
||||
"serial": 2013016250,
|
||||
"refresh": 3600,
|
||||
"retry": 1800,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 3600
|
||||
},
|
||||
{
|
||||
@@ -2344,7 +2344,7 @@
|
||||
"serial": 2021110100,
|
||||
"refresh": 1800,
|
||||
"retry": 900,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 86400
|
||||
}
|
||||
]
|
||||
@@ -3061,7 +3061,7 @@
|
||||
"serial": 2038682778,
|
||||
"refresh": 10000,
|
||||
"retry": 2400,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 3600
|
||||
},
|
||||
{
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
"serial": 2016030201,
|
||||
"refresh": 1800,
|
||||
"retry": 900,
|
||||
"cname": 2419200,
|
||||
"expire": 2419200,
|
||||
"minimum": 240
|
||||
}
|
||||
],
|
||||
@@ -403,7 +403,7 @@
|
||||
"serial": 2020073304,
|
||||
"refresh": 1080,
|
||||
"retry": 1800,
|
||||
"cname": 28800,
|
||||
"expire": 28800,
|
||||
"minimum": 36000
|
||||
}
|
||||
],
|
||||
@@ -581,7 +581,7 @@
|
||||
"serial": 1635782474,
|
||||
"refresh": 60,
|
||||
"retry": 60,
|
||||
"cname": 88473600,
|
||||
"expire": 88473600,
|
||||
"minimum": 60
|
||||
}
|
||||
]
|
||||
@@ -749,7 +749,7 @@
|
||||
"serial": 1635747392,
|
||||
"refresh": 900,
|
||||
"retry": 900,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 1800
|
||||
},
|
||||
{
|
||||
@@ -1293,7 +1293,7 @@
|
||||
"serial": 1457939306,
|
||||
"refresh": 3600,
|
||||
"retry": 360,
|
||||
"cname": 1801209600,
|
||||
"expire": 1801209600,
|
||||
"minimum": 180
|
||||
}
|
||||
]
|
||||
@@ -2228,7 +2228,7 @@
|
||||
"serial": 2021102760,
|
||||
"refresh": 7200,
|
||||
"retry": 3600,
|
||||
"cname": 24796800,
|
||||
"expire": 24796800,
|
||||
"minimum": 3600
|
||||
},
|
||||
{
|
||||
@@ -2630,7 +2630,7 @@
|
||||
"serial": 2021102760,
|
||||
"refresh": 7200,
|
||||
"retry": 3600,
|
||||
"cname": 24796800,
|
||||
"expire": 24796800,
|
||||
"minimum": 3600
|
||||
},
|
||||
{
|
||||
@@ -2768,7 +2768,7 @@
|
||||
"serial": 2038401813,
|
||||
"refresh": 10000,
|
||||
"retry": 2400,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 3600
|
||||
},
|
||||
{
|
||||
|
||||
@@ -643,7 +643,7 @@
|
||||
"serial": 2013012201,
|
||||
"refresh": 1800,
|
||||
"retry": 900,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 86400
|
||||
},
|
||||
{
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
"serial": 532,
|
||||
"refresh": 10800,
|
||||
"retry": 3600,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 60
|
||||
}
|
||||
],
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
"serial": 2012301931,
|
||||
"refresh": 7200,
|
||||
"retry": 600,
|
||||
"cname": 1209600,
|
||||
"expire": 1209600,
|
||||
"minimum": 300
|
||||
},
|
||||
{
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
"serial": 1635750116,
|
||||
"refresh": 1800,
|
||||
"retry": 900,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 86400
|
||||
},
|
||||
{
|
||||
@@ -781,7 +781,7 @@
|
||||
"serial": 1635750101,
|
||||
"refresh": 1800,
|
||||
"retry": 900,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 86400
|
||||
},
|
||||
{
|
||||
@@ -901,7 +901,7 @@
|
||||
"serial": 1635750101,
|
||||
"refresh": 1800,
|
||||
"retry": 900,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 86400
|
||||
},
|
||||
{
|
||||
@@ -1128,7 +1128,7 @@
|
||||
"serial": 1635750116,
|
||||
"refresh": 1800,
|
||||
"retry": 900,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 86400
|
||||
},
|
||||
{
|
||||
@@ -1355,7 +1355,7 @@
|
||||
"serial": 2027835935,
|
||||
"refresh": 7200,
|
||||
"retry": 3600,
|
||||
"cname": 2419200,
|
||||
"expire": 2419200,
|
||||
"minimum": 21600
|
||||
},
|
||||
{
|
||||
@@ -1444,7 +1444,7 @@
|
||||
"serial": 2028896702,
|
||||
"refresh": 7200,
|
||||
"retry": 3600,
|
||||
"cname": 2419200,
|
||||
"expire": 2419200,
|
||||
"minimum": 21600
|
||||
},
|
||||
{
|
||||
@@ -2152,7 +2152,7 @@
|
||||
"serial": 1635750101,
|
||||
"refresh": 1800,
|
||||
"retry": 900,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 86400
|
||||
},
|
||||
{
|
||||
@@ -2464,7 +2464,7 @@
|
||||
"serial": 3006085127,
|
||||
"refresh": 7200,
|
||||
"retry": 1800,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 3600
|
||||
},
|
||||
{
|
||||
@@ -7742,7 +7742,7 @@
|
||||
"serial": 1635750101,
|
||||
"refresh": 1800,
|
||||
"retry": 900,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 86400
|
||||
},
|
||||
{
|
||||
@@ -8002,7 +8002,7 @@
|
||||
"serial": 2014579941,
|
||||
"refresh": 1800,
|
||||
"retry": 900,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 86400
|
||||
},
|
||||
{
|
||||
@@ -8124,7 +8124,7 @@
|
||||
"serial": 2014579941,
|
||||
"refresh": 1800,
|
||||
"retry": 900,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 86400
|
||||
},
|
||||
{
|
||||
@@ -8245,7 +8245,7 @@
|
||||
"serial": 1635750101,
|
||||
"refresh": 1800,
|
||||
"retry": 900,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 86400
|
||||
},
|
||||
{
|
||||
@@ -8365,7 +8365,7 @@
|
||||
"serial": 1635750116,
|
||||
"refresh": 1800,
|
||||
"retry": 900,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 86400
|
||||
},
|
||||
{
|
||||
@@ -8624,7 +8624,7 @@
|
||||
"serial": 1635750116,
|
||||
"refresh": 1800,
|
||||
"retry": 900,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 86400
|
||||
},
|
||||
{
|
||||
@@ -8745,7 +8745,7 @@
|
||||
"serial": 2014579941,
|
||||
"refresh": 1800,
|
||||
"retry": 900,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 86400
|
||||
},
|
||||
{
|
||||
@@ -8867,7 +8867,7 @@
|
||||
"serial": 2014579941,
|
||||
"refresh": 1800,
|
||||
"retry": 900,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 86400
|
||||
},
|
||||
{
|
||||
@@ -12809,7 +12809,7 @@
|
||||
"serial": 2027835926,
|
||||
"refresh": 7200,
|
||||
"retry": 3600,
|
||||
"cname": 2419200,
|
||||
"expire": 2419200,
|
||||
"minimum": 21600
|
||||
},
|
||||
{
|
||||
@@ -13706,7 +13706,7 @@
|
||||
"serial": 2028896702,
|
||||
"refresh": 7200,
|
||||
"retry": 3600,
|
||||
"cname": 2419200,
|
||||
"expire": 2419200,
|
||||
"minimum": 21600
|
||||
},
|
||||
{
|
||||
@@ -14318,7 +14318,7 @@
|
||||
"serial": 2028896702,
|
||||
"refresh": 7200,
|
||||
"retry": 3600,
|
||||
"cname": 2419200,
|
||||
"expire": 2419200,
|
||||
"minimum": 21600
|
||||
},
|
||||
{
|
||||
@@ -14628,7 +14628,7 @@
|
||||
"serial": 1635750116,
|
||||
"refresh": 1800,
|
||||
"retry": 900,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 86400
|
||||
},
|
||||
{
|
||||
@@ -14944,7 +14944,7 @@
|
||||
"serial": 1635750028,
|
||||
"refresh": 7200,
|
||||
"retry": 7200,
|
||||
"cname": 3600000,
|
||||
"expire": 3600000,
|
||||
"minimum": 7200
|
||||
},
|
||||
{
|
||||
@@ -15910,7 +15910,7 @@
|
||||
"serial": 1635750101,
|
||||
"refresh": 1800,
|
||||
"retry": 900,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 86400
|
||||
},
|
||||
{
|
||||
@@ -16889,7 +16889,7 @@
|
||||
"serial": 1635749528,
|
||||
"refresh": 1800,
|
||||
"retry": 300,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 1800
|
||||
},
|
||||
{
|
||||
@@ -17578,7 +17578,7 @@
|
||||
"serial": 2028896702,
|
||||
"refresh": 7200,
|
||||
"retry": 3600,
|
||||
"cname": 2419200,
|
||||
"expire": 2419200,
|
||||
"minimum": 21600
|
||||
},
|
||||
{
|
||||
@@ -17667,7 +17667,7 @@
|
||||
"serial": 1635750101,
|
||||
"refresh": 1800,
|
||||
"retry": 900,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 86400
|
||||
},
|
||||
{
|
||||
@@ -18154,7 +18154,7 @@
|
||||
"serial": 2027835935,
|
||||
"refresh": 7200,
|
||||
"retry": 3600,
|
||||
"cname": 2419200,
|
||||
"expire": 2419200,
|
||||
"minimum": 21600
|
||||
},
|
||||
{
|
||||
@@ -18276,7 +18276,7 @@
|
||||
"serial": 2028896702,
|
||||
"refresh": 7200,
|
||||
"retry": 3600,
|
||||
"cname": 2419200,
|
||||
"expire": 2419200,
|
||||
"minimum": 21600
|
||||
},
|
||||
{
|
||||
@@ -18397,7 +18397,7 @@
|
||||
"serial": 1635750116,
|
||||
"refresh": 1800,
|
||||
"retry": 900,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 86400
|
||||
},
|
||||
{
|
||||
@@ -18517,7 +18517,7 @@
|
||||
"serial": 1635750101,
|
||||
"refresh": 1800,
|
||||
"retry": 900,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 86400
|
||||
},
|
||||
{
|
||||
@@ -18638,7 +18638,7 @@
|
||||
"serial": 1635750002,
|
||||
"refresh": 600,
|
||||
"retry": 300,
|
||||
"cname": 1814400,
|
||||
"expire": 1814400,
|
||||
"minimum": 300
|
||||
},
|
||||
{
|
||||
@@ -18866,7 +18866,7 @@
|
||||
"serial": 1635750101,
|
||||
"refresh": 1800,
|
||||
"retry": 900,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 86400
|
||||
},
|
||||
{
|
||||
@@ -18986,7 +18986,7 @@
|
||||
"serial": 1635750116,
|
||||
"refresh": 1800,
|
||||
"retry": 900,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 86400
|
||||
},
|
||||
{
|
||||
@@ -20724,7 +20724,7 @@
|
||||
"serial": 2027835935,
|
||||
"refresh": 7200,
|
||||
"retry": 3600,
|
||||
"cname": 2419200,
|
||||
"expire": 2419200,
|
||||
"minimum": 21600
|
||||
},
|
||||
{
|
||||
@@ -20920,7 +20920,7 @@
|
||||
"serial": 2027835935,
|
||||
"refresh": 7200,
|
||||
"retry": 3600,
|
||||
"cname": 2419200,
|
||||
"expire": 2419200,
|
||||
"minimum": 21600
|
||||
},
|
||||
{
|
||||
@@ -21585,7 +21585,7 @@
|
||||
"serial": 1635750116,
|
||||
"refresh": 1800,
|
||||
"retry": 900,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 86400
|
||||
},
|
||||
{
|
||||
@@ -21705,7 +21705,7 @@
|
||||
"serial": 1635750116,
|
||||
"refresh": 1800,
|
||||
"retry": 900,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 86400
|
||||
},
|
||||
{
|
||||
@@ -22074,7 +22074,7 @@
|
||||
"serial": 1635750116,
|
||||
"refresh": 1800,
|
||||
"retry": 900,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 86400
|
||||
},
|
||||
{
|
||||
@@ -22441,7 +22441,7 @@
|
||||
"serial": 2014579941,
|
||||
"refresh": 1800,
|
||||
"retry": 900,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 86400
|
||||
},
|
||||
{
|
||||
@@ -22562,7 +22562,7 @@
|
||||
"serial": 1635750116,
|
||||
"refresh": 1800,
|
||||
"retry": 900,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 86400
|
||||
},
|
||||
{
|
||||
@@ -22757,7 +22757,7 @@
|
||||
"serial": 2107261307,
|
||||
"refresh": 3600,
|
||||
"retry": 15,
|
||||
"cname": 86400,
|
||||
"expire": 86400,
|
||||
"minimum": 3600
|
||||
},
|
||||
{
|
||||
@@ -22878,7 +22878,7 @@
|
||||
"serial": 1635750116,
|
||||
"refresh": 1800,
|
||||
"retry": 900,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 86400
|
||||
},
|
||||
{
|
||||
@@ -22998,7 +22998,7 @@
|
||||
"serial": 1635750101,
|
||||
"refresh": 1800,
|
||||
"retry": 900,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 86400
|
||||
},
|
||||
{
|
||||
@@ -26096,7 +26096,7 @@
|
||||
"serial": 1635750116,
|
||||
"refresh": 1800,
|
||||
"retry": 900,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 86400
|
||||
},
|
||||
{
|
||||
@@ -26879,7 +26879,7 @@
|
||||
"serial": 2028896702,
|
||||
"refresh": 7200,
|
||||
"retry": 3600,
|
||||
"cname": 2419200,
|
||||
"expire": 2419200,
|
||||
"minimum": 21600
|
||||
},
|
||||
{
|
||||
@@ -27066,7 +27066,7 @@
|
||||
"serial": 1635750101,
|
||||
"refresh": 1800,
|
||||
"retry": 900,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 86400
|
||||
},
|
||||
{
|
||||
@@ -27716,7 +27716,7 @@
|
||||
"serial": 1635750116,
|
||||
"refresh": 1800,
|
||||
"retry": 900,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 86400
|
||||
},
|
||||
{
|
||||
@@ -28685,7 +28685,7 @@
|
||||
"serial": 1635750116,
|
||||
"refresh": 1800,
|
||||
"retry": 900,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 86400
|
||||
},
|
||||
{
|
||||
@@ -32160,7 +32160,7 @@
|
||||
"serial": 1635749528,
|
||||
"refresh": 1800,
|
||||
"retry": 300,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 1800
|
||||
},
|
||||
{
|
||||
@@ -33009,7 +33009,7 @@
|
||||
"serial": 1635750101,
|
||||
"refresh": 1800,
|
||||
"retry": 900,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 86400
|
||||
},
|
||||
{
|
||||
@@ -33097,7 +33097,7 @@
|
||||
"serial": 2027084453,
|
||||
"refresh": 7200,
|
||||
"retry": 3600,
|
||||
"cname": 2419200,
|
||||
"expire": 2419200,
|
||||
"minimum": 21600
|
||||
},
|
||||
{
|
||||
@@ -36151,7 +36151,7 @@
|
||||
"serial": 200211427,
|
||||
"refresh": 86400,
|
||||
"retry": 7200,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 86400
|
||||
},
|
||||
{
|
||||
@@ -42583,7 +42583,7 @@
|
||||
"serial": 1635750101,
|
||||
"refresh": 1800,
|
||||
"retry": 900,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 86400
|
||||
},
|
||||
{
|
||||
@@ -42703,7 +42703,7 @@
|
||||
"serial": 1635750101,
|
||||
"refresh": 1800,
|
||||
"retry": 900,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 86400
|
||||
},
|
||||
{
|
||||
@@ -42930,7 +42930,7 @@
|
||||
"serial": 1635750101,
|
||||
"refresh": 1800,
|
||||
"retry": 900,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 86400
|
||||
},
|
||||
{
|
||||
@@ -43221,7 +43221,7 @@
|
||||
"serial": 1635750116,
|
||||
"refresh": 1800,
|
||||
"retry": 900,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 86400
|
||||
},
|
||||
{
|
||||
@@ -43558,7 +43558,7 @@
|
||||
"serial": 1635750116,
|
||||
"refresh": 1800,
|
||||
"retry": 900,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 86400
|
||||
},
|
||||
{
|
||||
@@ -44256,7 +44256,7 @@
|
||||
"serial": 1635750101,
|
||||
"refresh": 1800,
|
||||
"retry": 900,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 86400
|
||||
},
|
||||
{
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
"serial": 2012301933,
|
||||
"refresh": 7200,
|
||||
"retry": 600,
|
||||
"cname": 1209600,
|
||||
"expire": 1209600,
|
||||
"minimum": 300
|
||||
},
|
||||
{
|
||||
@@ -660,7 +660,7 @@
|
||||
"serial": 2012301931,
|
||||
"refresh": 7200,
|
||||
"retry": 600,
|
||||
"cname": 1209600,
|
||||
"expire": 1209600,
|
||||
"minimum": 300
|
||||
},
|
||||
{
|
||||
@@ -1042,7 +1042,7 @@
|
||||
"serial": 2012301931,
|
||||
"refresh": 7200,
|
||||
"retry": 600,
|
||||
"cname": 1209600,
|
||||
"expire": 1209600,
|
||||
"minimum": 300
|
||||
},
|
||||
{
|
||||
@@ -1666,7 +1666,7 @@
|
||||
"serial": 2012301931,
|
||||
"refresh": 7200,
|
||||
"retry": 600,
|
||||
"cname": 1209600,
|
||||
"expire": 1209600,
|
||||
"minimum": 300
|
||||
},
|
||||
{
|
||||
@@ -2290,7 +2290,7 @@
|
||||
"serial": 2012301931,
|
||||
"refresh": 7200,
|
||||
"retry": 600,
|
||||
"cname": 1209600,
|
||||
"expire": 1209600,
|
||||
"minimum": 300
|
||||
},
|
||||
{
|
||||
@@ -2914,7 +2914,7 @@
|
||||
"serial": 2012301931,
|
||||
"refresh": 7200,
|
||||
"retry": 600,
|
||||
"cname": 1209600,
|
||||
"expire": 1209600,
|
||||
"minimum": 300
|
||||
},
|
||||
{
|
||||
@@ -3646,7 +3646,7 @@
|
||||
"serial": 2012301931,
|
||||
"refresh": 7200,
|
||||
"retry": 600,
|
||||
"cname": 1209600,
|
||||
"expire": 1209600,
|
||||
"minimum": 300
|
||||
},
|
||||
{
|
||||
@@ -4136,7 +4136,7 @@
|
||||
"serial": 2012301931,
|
||||
"refresh": 7200,
|
||||
"retry": 600,
|
||||
"cname": 1209600,
|
||||
"expire": 1209600,
|
||||
"minimum": 300
|
||||
},
|
||||
{
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
"serial": 2013016250,
|
||||
"refresh": 3600,
|
||||
"retry": 1800,
|
||||
"cname": 604800,
|
||||
"expire": 604800,
|
||||
"minimum": 3600
|
||||
},
|
||||
{
|
||||
|
||||
@@ -100,10 +100,24 @@ extern "C" int commit_test_result_json(cJSON *node, const char *name)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void perf_resource_record_decode(struct dns_message *dns_msg)
|
||||
extern void dns_message_answer_resource_record_get0(struct dns_message *msg, struct dns_resource_record **answer_rr, uint16_t *n_answer_rr);
|
||||
extern void dns_message_authority_resource_record_get0(struct dns_message *msg, struct dns_resource_record **authority_rr, uint16_t *n_authority_rr);
|
||||
extern void dns_message_additional_resource_record_get0(struct dns_message *msg, struct dns_resource_record **additional_rr, uint16_t *n_additional_rr);
|
||||
|
||||
void perf_resource_record_decode(struct dns_message *msg)
|
||||
{
|
||||
TIME_START();
|
||||
uint16_t n_answer_rr=0;
|
||||
struct dns_resource_record *answer_rr=NULL;
|
||||
dns_message_answer_resource_record_get0(msg, &answer_rr, &n_answer_rr);
|
||||
|
||||
uint16_t n_authority_rr=0;
|
||||
struct dns_resource_record *authority_rr=NULL;
|
||||
dns_message_authority_resource_record_get0(msg, &authority_rr, &n_authority_rr);
|
||||
|
||||
uint16_t n_additional_rr=0;
|
||||
struct dns_resource_record *additional_rr=NULL;
|
||||
dns_message_additional_resource_record_get0(msg, &additional_rr, &n_additional_rr);
|
||||
TIME_DIFF();
|
||||
//fieldstat_easy_histogram_record(main_env->fse.handle, tid, main_env->fse.id[PERF_TAG_QUESTION], &(main_env->fse.tag[PERF_TAG_QUESTION]), 1, time_diff_ns)
|
||||
}
|
||||
@@ -207,8 +221,16 @@ int32_t dns_decoder_test_config_load(const char *cfg_path, struct perf_main_env
|
||||
toml_free(root);
|
||||
return -1;
|
||||
}
|
||||
|
||||
toml_table_t *perf_tbl=toml_table_in(test_tbl, "perf");
|
||||
if(NULL==perf_tbl)
|
||||
{
|
||||
fprintf(stderr, "[%s:%d] config file: %s has no key: [decoder.dns.test.perf]", __FUNCTION__, __LINE__, cfg_path);
|
||||
toml_free(root);
|
||||
return -1;
|
||||
}
|
||||
|
||||
toml_datum_t perf_worker_thread_num_val=toml_int_in(test_tbl, "perf_worker_thread_num");
|
||||
toml_datum_t perf_worker_thread_num_val=toml_int_in(perf_tbl, "perf_worker_thread_num");
|
||||
if(perf_worker_thread_num_val.ok)
|
||||
{
|
||||
main_env->worker_thread_num=perf_worker_thread_num_val.u.i;
|
||||
|
||||
@@ -29,7 +29,6 @@ struct dns_decoder_test_plugin_env
|
||||
int topic_id;
|
||||
int result_index;
|
||||
int commit_result_enable;
|
||||
int write_result_enable;
|
||||
int decode_resource_record_enable;
|
||||
int export_resource_record_enable;
|
||||
};
|
||||
@@ -64,51 +63,40 @@ void dns_decoder_test_message_cb(struct session *ss, int topic_id, const void *m
|
||||
return ;
|
||||
}
|
||||
|
||||
cJSON *real_result=cJSON_CreateObject();
|
||||
cJSON_AddStringToObject(real_result, "Tuple4", session_get0_readable_addr(ss));
|
||||
|
||||
uint16_t n_question=0;
|
||||
struct dns_query_question *question=NULL;
|
||||
dns_message_query_question_get0(dns_msg, &question, &n_question);
|
||||
if(n_question>0 && question!=NULL)
|
||||
{
|
||||
cJSON_AddStringToObject(real_result, "dns_qname", dns_query_question_qname_get0(question));
|
||||
cJSON_AddNumberToObject(real_result, "dns_qtype", dns_query_question_qtype_get0(question));
|
||||
cJSON_AddNumberToObject(real_result, "dns_qclass", dns_query_question_qclass_get0(question));
|
||||
}
|
||||
|
||||
struct dns_flag *flag=dns_message_header_flag_get0(dns_msg);
|
||||
if(flag!=NULL)
|
||||
{
|
||||
cJSON_AddNumberToObject(real_result, "dns_qr", (double)(flag->qr));
|
||||
cJSON_AddNumberToObject(real_result, "dns_opcode", (double)(flag->opcode));
|
||||
cJSON_AddNumberToObject(real_result, "dns_rd", (double)(flag->rd));
|
||||
}
|
||||
|
||||
const char *resource_record_str=dns_message_resource_record_json_exporter(dns_msg);
|
||||
if(resource_record_str!=NULL)
|
||||
{
|
||||
cJSON *rr_array=cJSON_Parse(resource_record_str);
|
||||
cJSON_AddItemToObject(real_result, "rr", rr_array);
|
||||
}
|
||||
|
||||
if(plugin_env->write_result_enable==1)
|
||||
{
|
||||
char *real_result_str=cJSON_Print(real_result);
|
||||
dns_real_result_write_file(real_result_str);
|
||||
free(real_result_str);
|
||||
}
|
||||
|
||||
if(plugin_env->commit_result_enable==1)
|
||||
{
|
||||
cJSON *real_result=cJSON_CreateObject();
|
||||
cJSON_AddStringToObject(real_result, "Tuple4", session_get0_readable_addr(ss));
|
||||
|
||||
uint16_t n_question=0;
|
||||
struct dns_query_question *question=NULL;
|
||||
dns_message_query_question_get0(dns_msg, &question, &n_question);
|
||||
if(n_question>0 && question!=NULL)
|
||||
{
|
||||
cJSON_AddStringToObject(real_result, "dns_qname", dns_query_question_qname_get0(question));
|
||||
cJSON_AddNumberToObject(real_result, "dns_qtype", dns_query_question_qtype_get0(question));
|
||||
cJSON_AddNumberToObject(real_result, "dns_qclass", dns_query_question_qclass_get0(question));
|
||||
}
|
||||
|
||||
struct dns_flag *flag=dns_message_header_flag_get0(dns_msg);
|
||||
if(flag!=NULL)
|
||||
{
|
||||
cJSON_AddNumberToObject(real_result, "dns_qr", (double)(flag->qr));
|
||||
cJSON_AddNumberToObject(real_result, "dns_opcode", (double)(flag->opcode));
|
||||
cJSON_AddNumberToObject(real_result, "dns_rd", (double)(flag->rd));
|
||||
}
|
||||
|
||||
const char *resource_record_str=dns_message_resource_record_json_exporter(dns_msg);
|
||||
if(resource_record_str!=NULL)
|
||||
{
|
||||
cJSON *rr_array=cJSON_Parse(resource_record_str);
|
||||
cJSON_AddItemToObject(real_result, "rr", rr_array);
|
||||
}
|
||||
|
||||
char result_name[16]="";
|
||||
sprintf(result_name, "DNS_RESULT_%d", plugin_env->result_index++);
|
||||
commit_test_result_json(real_result, result_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
cJSON_Delete(real_result);
|
||||
}
|
||||
}
|
||||
|
||||
void *dns_decoder_test_per_session_context_new(struct session *sess, void *plugin_env)
|
||||
@@ -183,31 +171,16 @@ int32_t dns_decoder_test_config_load(const char *cfg_path, struct dns_decoder_te
|
||||
}
|
||||
}
|
||||
|
||||
toml_datum_t write_result_enable_val=toml_string_in(test_tbl, "write_result_enable");
|
||||
if(write_result_enable_val.ok==0)
|
||||
{
|
||||
plugin_env->write_result_enable=0;
|
||||
fprintf(stderr, "[%s:%d] config file: %s has no key: [decoder.dns.test.write_result_enable]", __FUNCTION__, __LINE__, cfg_path);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(memcmp("no", write_result_enable_val.u.s, strlen("no"))==0)
|
||||
{
|
||||
plugin_env->write_result_enable=0;
|
||||
}
|
||||
else if(memcmp("yes", write_result_enable_val.u.s, strlen("yes"))==0)
|
||||
{
|
||||
plugin_env->write_result_enable=1;
|
||||
}
|
||||
else
|
||||
{
|
||||
plugin_env->write_result_enable=1;
|
||||
fprintf(stderr, "[%s:%d] config file: %s key: [decoder.dns.test.write_result_enable] value is not yes or no", __FUNCTION__, __LINE__, cfg_path);
|
||||
}
|
||||
}
|
||||
toml_table_t *perf_tbl=toml_table_in(test_tbl, "perf");
|
||||
if(NULL==perf_tbl)
|
||||
{
|
||||
fprintf(stderr, "[%s:%d] config file: %s has no key: [decoder.dns.test.perf]", __FUNCTION__, __LINE__, cfg_path);
|
||||
toml_free(root);
|
||||
return -1;
|
||||
}
|
||||
|
||||
// decode_resource_record_enable
|
||||
toml_datum_t decode_resource_record_enable_val=toml_string_in(test_tbl, "decode_resource_record_enable");
|
||||
toml_datum_t decode_resource_record_enable_val=toml_string_in(perf_tbl, "decode_resource_record_enable");
|
||||
if(decode_resource_record_enable_val.ok==0)
|
||||
{
|
||||
plugin_env->decode_resource_record_enable=0;
|
||||
@@ -231,7 +204,7 @@ int32_t dns_decoder_test_config_load(const char *cfg_path, struct dns_decoder_te
|
||||
}
|
||||
|
||||
// export_resource_record_enable
|
||||
toml_datum_t export_resource_record_enable_val=toml_string_in(test_tbl, "export_resource_record_enable");
|
||||
toml_datum_t export_resource_record_enable_val=toml_string_in(perf_tbl, "export_resource_record_enable");
|
||||
if(export_resource_record_enable_val.ok==0)
|
||||
{
|
||||
plugin_env->export_resource_record_enable=0;
|
||||
|
||||
Reference in New Issue
Block a user