[Perf] Add more fields to the perf profiler json parser

Reviewed By: ddino

Differential Revision: D9682878

fbshipit-source-id: aebec94e1
master
Martino Luca 6 years ago committed by Facebook Github Bot
parent 911a2e1906
commit b5efc56afb

@ -2,6 +2,8 @@ type perf_profiler_item = {
function_name : string; function_name : string;
avg_inclusive_cpu_time_ms : float; avg_inclusive_cpu_time_ms : float;
avg_exclusive_cpu_time_ms : float; avg_exclusive_cpu_time_ms : float;
p90_inclusive_cpu_time_ms : float;
p90_exclusive_cpu_time_ms : float;
} }
type perf_profiler = perf_profiler_item list type perf_profiler = perf_profiler_item list

@ -15,10 +15,12 @@ let test_parser =
in in
[ ("test_parser_1", "[]", []) [ ("test_parser_1", "[]", [])
; ( "test_parser_2" ; ( "test_parser_2"
, {|[{"function_name":"pkg/cls::\u003Cclinit>","avg_inclusive_cpu_time_ms":123.01234567899,"avg_exclusive_cpu_time_ms":9.8765432123456}]|} , {|[{"function_name":"pkg/cls::\u003Cclinit>","avg_inclusive_cpu_time_ms":123.01234567899,"avg_exclusive_cpu_time_ms":9.8765432123456,"p90_inclusive_cpu_time_ms":1.012,"p90_exclusive_cpu_time_ms":3.14159}]|}
, [ { Perf_profiler_t.function_name= "pkg/cls::<clinit>" , [ { Perf_profiler_t.function_name= "pkg/cls::<clinit>"
; avg_inclusive_cpu_time_ms= 123.01234567899 ; avg_inclusive_cpu_time_ms= 123.01234567899
; avg_exclusive_cpu_time_ms= 9.8765432123456 } ] ) ] ; avg_exclusive_cpu_time_ms= 9.8765432123456
; p90_inclusive_cpu_time_ms= 1.012
; p90_exclusive_cpu_time_ms= 3.14159 } ] ) ]
|> List.map ~f:(fun (name, test_input, expected_output) -> |> List.map ~f:(fun (name, test_input, expected_output) ->
name >:: create_test test_input expected_output ) name >:: create_test test_input expected_output )

Loading…
Cancel
Save