Hello and thank you for this awesome work!
I was working on changing the code to use jsonencode instead of prettyjson, when i stumbled across an odd behavior, described as example below.
Perhaps I have a different understanding on how to interpret the trace data, in which case I am also happy to be corrected.
Example
For the creation of parallel traces. The behaviour is the same for sequential traces.
Input data
For the traceid=0b0ab4e315919238654535000ead8e:
| Nr |
traceid |
timestamp |
rpcid |
um |
rpc_type |
dm |
interface |
response_time |
| 50584 |
"0b0ab4e315919238654535000ead8e" |
265451 |
"0" |
"synthetic_id_as_the_upstream_of_this_trace_entry_is_the_end_user" |
"http" |
"7695b43b41732a0f15d3799c8eed2852665fe8da29fd700c383550fc16e521a3" |
"1f888de4377607e9402377e6ab0e83cc3c542b95e9c2133caa7e29e2028796a0" |
-8 |
| 50581 |
"0b0ab4e315919238654535000ead8e" |
265457 |
"0.1" |
"7695b43b41732a0f15d3799c8eed2852665fe8da29fd700c383550fc16e521a3" |
"http" |
"9a3ef4d24dd4e7fb8baaa9e30aea1395caa50f583630f69047c8e20f2e8d9554" |
"1f888de4377607e9402377e6ab0e83cc3c542b95e9c2133caa7e29e2028796a0" |
-4 |
| 50580 |
"0b0ab4e315919238654535000ead8e" |
265457 |
"0.1.1" |
"9a3ef4d24dd4e7fb8baaa9e30aea1395caa50f583630f69047c8e20f2e8d9554" |
"mc" |
"9653f5baba69c9fb50bfb30a8571eb04dbceaae7c7f379e20bd73a41168a2913" |
"" |
1 |
| 50579 |
"0b0ab4e315919238654535000ead8e" |
265460 |
"0.1.2" |
"9a3ef4d24dd4e7fb8baaa9e30aea1395caa50f583630f69047c8e20f2e8d9554" |
"rpc" |
"9a3ef4d24dd4e7fb8baaa9e30aea1395caa50f583630f69047c8e20f2e8d9554" |
"da36ccfdc24fd53f0626f1a2b234ded133e139f240ae650cd6f707c424c5c3e8" |
0 |
| 50583 |
"0b0ab4e315919238654535000ead8e" |
265460 |
"0.1.2.1" |
"9a3ef4d24dd4e7fb8baaa9e30aea1395caa50f583630f69047c8e20f2e8d9554" |
"mc" |
"9ee59483550ea795bc04e930ad6b37b7852e92fa9a71556565e91380dd39de03" |
"" |
0 |
basic structure as 'graph'
""
|_ 7695b43b41732a0f15d3799c8eed2852665fe8da29fd700c383550fc16e521a3 -> s0
|_ 9a3ef4d24dd4e7fb8baaa9e30aea1395caa50f583630f69047c8e20f2e8d9554 -> s1
|_ [calls self] -> skipped
|_ 9653f5baba69c9fb50bfb30a8571eb04dbceaae7c7f379e20bd73a41168a2913 -> s2
|_ 9ee59483550ea795bc04e930ad6b37b7852e92fa9a71556565e91380dd39de03 -> s3
in words:
- s0 calls s1
- s1 calls [s2, s3]
so I believe the resulting trace should look something like this:
Expected Results
{
"s0": [
{"s1": [
{"s2": [{}]},
{"s3": [{}]}
]}
]
}
Actual Results
{
"s0":[
{"s2":[{}]},
{"s1":[
{"s3":[{}]}
]}
]
}
Comparison
- s0 -> s3 is in tact.
- s0 -> s2 ERROR
- s1 is being skipped
- s0 directly calls s2
Matlab Code
Nr = [50584; 50581; 50580; 50579; 50583];
traceid = ["0b0ab4e315919238654535000ead8e";"0b0ab4e315919238654535000ead8e";"0b0ab4e315919238654535000ead8e";"0b0ab4e315919238654535000ead8e";"0b0ab4e315919238654535000ead8e"];
timestamp = [265451; 265457; 265457; 265460; 265460];
rpcid = ["0"; "0.1"; "0.1.1"; "0.1.2"; "0.1.2.1"];
um = [""; ...
"7695b43b41732a0f15d3799c8eed2852665fe8da29fd700c383550fc16e521a3"; ...
"9a3ef4d24dd4e7fb8baaa9e30aea1395caa50f583630f69047c8e20f2e8d9554"; ...
"9a3ef4d24dd4e7fb8baaa9e30aea1395caa50f583630f69047c8e20f2e8d9554"; ...
"9a3ef4d24dd4e7fb8baaa9e30aea1395caa50f583630f69047c8e20f2e8d9554"];
rpc_type = ["http"; "http"; "mc"; "rpc";"mc"];
dm = ["7695b43b41732a0f15d3799c8eed2852665fe8da29fd700c383550fc16e521a3"; ...
"9a3ef4d24dd4e7fb8baaa9e30aea1395caa50f583630f69047c8e20f2e8d9554"; ...
"9653f5baba69c9fb50bfb30a8571eb04dbceaae7c7f379e20bd73a41168a2913"; ...
"9a3ef4d24dd4e7fb8baaa9e30aea1395caa50f583630f69047c8e20f2e8d9554"; ...
"9ee59483550ea795bc04e930ad6b37b7852e92fa9a71556565e91380dd39de03"];
interface = ["1f888de4377607e9402377e6ab0e83cc3c542b95e9c2133caa7e29e2028796a0"; ...
"1f888de4377607e9402377e6ab0e83cc3c542b95e9c2133caa7e29e2028796a0"; ...
""; ...
"da36ccfdc24fd53f0626f1a2b234ded133e139f240ae650cd6f707c424c5c3e8"; ...
""];
response_time = [-8; -4; 1; 0; 0];
trace = table(Nr, traceid, timestamp, rpcid, um, rpc_type, dm, interface, response_time);
% skipping service_graphs...
names_map = unique([trace.um ; trace.dm]);
concatted = get_json_mubench('0.1',trace,names_map,0)
jsonencode(jsondecode("{"+concatted+"}"), "PrettyPrint",true)
Hello and thank you for this awesome work!
I was working on changing the code to use
jsonencodeinstead ofprettyjson, when i stumbled across an odd behavior, described as example below.Perhaps I have a different understanding on how to interpret the trace data, in which case I am also happy to be corrected.
Example
For the creation of parallel traces. The behaviour is the same for sequential traces.
Input data
For the
traceid=0b0ab4e315919238654535000ead8e:basic structure as 'graph'
in words:
so I believe the resulting trace should look something like this:
Expected Results
{ "s0": [ {"s1": [ {"s2": [{}]}, {"s3": [{}]} ]} ] }Actual Results
{ "s0":[ {"s2":[{}]}, {"s1":[ {"s3":[{}]} ]} ] }Comparison
Matlab Code