From 89dac20da8c4af649f4b3b38aaf27318e129b0c7 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Fri, 9 Jun 2023 16:08:43 -0400 Subject: [PATCH] update test --- test/t1.expected | 4 +++- test/t1.ml | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/test/t1.expected b/test/t1.expected index 26bd7ac..7842372 100644 --- a/test/t1.expected +++ b/test/t1.expected @@ -1,4 +1,6 @@ -[{"pid": 2,"cat":"","tid": 3,"ts": 2.00,"name":"hello 1 2","ph":"I"}, +[{"pid": 2,"name":"process_name","ph":"M","args": {"name":"main"}}, +{"pid": 2,"tid": 3,"name":"thread_name","ph":"M","args": {"name":"t1"}}, +{"pid": 2,"cat":"","tid": 3,"ts": 2.00,"name":"hello 1 2","ph":"I"}, {"pid": 2,"cat":"","tid": 3,"dur": 2.00,"ts": 1.00,"name":"inner.loop","ph":"X"}, {"pid": 2,"cat":"","tid": 3,"ts": 5.00,"name":"hello 1 3","ph":"I"}, {"pid": 2,"cat":"","tid": 3,"dur": 2.00,"ts": 4.00,"name":"inner.loop","ph":"X"}, diff --git a/test/t1.ml b/test/t1.ml index aabc361..d9656dc 100644 --- a/test/t1.ml +++ b/test/t1.ml @@ -1,4 +1,6 @@ let run () = + Trace.set_process_name "main"; + Trace.set_thread_name "t1"; for _i = 1 to 50 do Trace.with_span ~__FILE__ ~__LINE__ "outer.loop" @@ fun _sp -> for _j = 2 to 5 do