[cost] Adjust cold-start loom query

Summary: In line with changes to loom query in D19903057, let's adjust Infer's processing of the results.

Reviewed By: martintrojer

Differential Revision: D19902933

fbshipit-source-id: 200b3a03e
master
Ezgi Çiçek 5 years ago committed by Facebook Github Bot
parent bf210844d9
commit ceb50cdf0e

@ -7,17 +7,11 @@
type perf_profiler_item = {
function_name: string;
count_trace_id: int;
approx_count_trace_id: int;
sum_inclusive_cpu_time: float;
avg_inclusive_cpu_time_ms: float;
sum_exclusive_cpu_time: float;
avg_exclusive_cpu_time_ms: float;
p90_inclusive_cpu_time_ms: float;
p90_exclusive_cpu_time_ms: float;
p50_inclusive_cpu_time_ms: float;
p50_exclusive_cpu_time_ms: float;
p25_inclusive_cpu_time_ms: float;
p25_exclusive_cpu_time_ms: float;
}
type perf_profiler = perf_profiler_item list

@ -45,17 +45,9 @@ let pp_perf_profiler_item itm =
\ sum inclusive cpu time = %f@\n\
\ avg inclusive time = %f @\n\
\ sum exclusive cpu time = %f @\n\
\ avg exclusive_time = %f @\n\
\ inclusive p90 = %f @\n\
\ exclusive p90 = %f @\n\
\ inclusive p50 = %f @\n\
\ exclusive p50 = %f @\n\
\ inclusive p25 = %f @\n\
\ exclusive p25 = %f @\n"
itm.function_name itm.count_trace_id itm.sum_inclusive_cpu_time itm.avg_inclusive_cpu_time_ms
itm.sum_exclusive_cpu_time itm.avg_exclusive_cpu_time_ms itm.p90_inclusive_cpu_time_ms
itm.p90_exclusive_cpu_time_ms itm.p50_inclusive_cpu_time_ms itm.p50_exclusive_cpu_time_ms
itm.p25_inclusive_cpu_time_ms itm.p25_exclusive_cpu_time_ms
\ avg exclusive_time = %f @\n"
itm.function_name itm.approx_count_trace_id itm.sum_inclusive_cpu_time
itm.avg_inclusive_cpu_time_ms itm.sum_exclusive_cpu_time itm.avg_exclusive_cpu_time_ms
let _read_file_perf_data fname =

@ -16,30 +16,18 @@ let test_parser =
[ ("test_parser_1", "[]", [])
; ( "test_parser_2"
, {|[{"function_name":"pkg/cls::\u003Cclinit>",
"count_trace_id": 2,
"approx_count_trace_id": 2,
"sum_inclusive_cpu_time": 34.4324324,
"avg_inclusive_cpu_time_ms":123.01234567899,
"sum_exclusive_cpu_time": 17.4543543,
"avg_exclusive_cpu_time_ms":9.8765432123456,
"p90_inclusive_cpu_time_ms":1.0,
"p90_exclusive_cpu_time_ms":1.15,
"p50_inclusive_cpu_time_ms": 1.1,
"p50_exclusive_cpu_time_ms": 1.2,
"p25_inclusive_cpu_time_ms": 1.3,
"p25_exclusive_cpu_time_ms": 1.4
"avg_exclusive_cpu_time_ms":9.8765432123456
}]|}
, [ { Perf_profiler_t.function_name= "pkg/cls::<clinit>"
; count_trace_id= 2
; approx_count_trace_id= 2
; sum_inclusive_cpu_time= 34.4324324
; avg_inclusive_cpu_time_ms= 123.01234567899
; sum_exclusive_cpu_time= 17.4543543
; avg_exclusive_cpu_time_ms= 9.8765432123456
; p90_inclusive_cpu_time_ms= 1.0
; p90_exclusive_cpu_time_ms= 1.15
; p50_inclusive_cpu_time_ms= 1.1
; p50_exclusive_cpu_time_ms= 1.2
; p25_inclusive_cpu_time_ms= 1.3
; p25_exclusive_cpu_time_ms= 1.4 } ] ) ]
; avg_exclusive_cpu_time_ms= 9.8765432123456 } ] ) ]
|> List.map ~f:(fun (name, test_input, expected_output) ->
name >:: create_test test_input expected_output )

@ -1 +1 @@
[{"function_name":"DiffExampleColdStart::f1","count_trace_id":2,"sum_inclusive_cpu_time":44,"avg_inclusive_cpu_time_ms":22,"sum_exclusive_cpu_time":0,"avg_exclusive_cpu_time_ms":0,"p90_inclusive_cpu_time_ms":22,"p90_exclusive_cpu_time_ms":0,"p50_inclusive_cpu_time_ms":22,"p50_exclusive_cpu_time_ms":0,"p25_inclusive_cpu_time_ms":22,"p25_exclusive_cpu_time_ms":0},{"function_name":"DiffExampleColdStart::f2","count_trace_id":1,"sum_inclusive_cpu_time":11,"avg_inclusive_cpu_time_ms":11,"sum_exclusive_cpu_time":0,"avg_exclusive_cpu_time_ms":0,"p90_inclusive_cpu_time_ms":11,"p90_exclusive_cpu_time_ms":0,"p50_inclusive_cpu_time_ms":11,"p50_exclusive_cpu_time_ms":0,"p25_inclusive_cpu_time_ms":11,"p25_exclusive_cpu_time_ms":0},{"function_name":"DiffExampleColdStart::f3","count_trace_id":2,"sum_inclusive_cpu_time":44,"avg_inclusive_cpu_time_ms":22,"sum_exclusive_cpu_time":0,"avg_exclusive_cpu_time_ms":0,"p90_inclusive_cpu_time_ms":22,"p90_exclusive_cpu_time_ms":0,"p50_inclusive_cpu_time_ms":22,"p50_exclusive_cpu_time_ms":0,"p25_inclusive_cpu_time_ms":22,"p25_exclusive_cpu_time_ms":0},{"function_name":"DiffExampleColdStart::f4","count_trace_id":2,"sum_inclusive_cpu_time":44,"avg_inclusive_cpu_time_ms":22,"sum_exclusive_cpu_time":0,"avg_exclusive_cpu_time_ms":0,"p90_inclusive_cpu_time_ms":22,"p90_exclusive_cpu_time_ms":0,"p50_inclusive_cpu_time_ms":22,"p50_exclusive_cpu_time_ms":0,"p25_inclusive_cpu_time_ms":22,"p25_exclusive_cpu_time_ms":0},{"function_name":"DiffExampleColdStart::f55","count_trace_id":2,"sum_inclusive_cpu_time":44,"avg_inclusive_cpu_time_ms":22,"sum_exclusive_cpu_time":0,"avg_exclusive_cpu_time_ms":0,"p90_inclusive_cpu_time_ms":22,"p90_exclusive_cpu_time_ms":0,"p50_inclusive_cpu_time_ms":22,"p50_exclusive_cpu_time_ms":0,"p25_inclusive_cpu_time_ms":22,"p25_exclusive_cpu_time_ms":0},{"function_name":"DiffExampleColdStart::f6","count_trace_id":2,"sum_inclusive_cpu_time":44,"avg_inclusive_cpu_time_ms":22,"sum_exclusive_cpu_time":0,"avg_exclusive_cpu_time_ms":0,"p90_inclusive_cpu_time_ms":22,"p90_exclusive_cpu_time_ms":0,"p50_inclusive_cpu_time_ms":22,"p50_exclusive_cpu_time_ms":0,"p25_inclusive_cpu_time_ms":22,"p25_exclusive_cpu_time_ms":0}]
[{"function_name":"DiffExampleColdStart::f1","approx_count_trace_id":2,"sum_inclusive_cpu_time":44,"avg_inclusive_cpu_time_ms":22,"sum_exclusive_cpu_time":0,"avg_exclusive_cpu_time_ms":0},{"function_name":"DiffExampleColdStart::f2","approx_count_trace_id":1,"sum_inclusive_cpu_time":11,"avg_inclusive_cpu_time_ms":11,"sum_exclusive_cpu_time":0,"avg_exclusive_cpu_time_ms":0},{"function_name":"DiffExampleColdStart::f3","approx_count_trace_id":2,"sum_inclusive_cpu_time":44,"avg_inclusive_cpu_time_ms":22,"sum_exclusive_cpu_time":0,"avg_exclusive_cpu_time_ms":0},{"function_name":"DiffExampleColdStart::f4","approx_count_trace_id":2,"sum_inclusive_cpu_time":44,"avg_inclusive_cpu_time_ms":22,"sum_exclusive_cpu_time":0,"avg_exclusive_cpu_time_ms":0},{"function_name":"DiffExampleColdStart::f55","approx_count_trace_id":2,"sum_inclusive_cpu_time":44,"avg_inclusive_cpu_time_ms":22,"sum_exclusive_cpu_time":0,"avg_exclusive_cpu_time_ms":0},{"function_name":"DiffExampleColdStart::f6","approx_count_trace_id":2,"sum_inclusive_cpu_time":44,"avg_inclusive_cpu_time_ms":22,"sum_exclusive_cpu_time":0,"avg_exclusive_cpu_time_ms":0}]

Loading…
Cancel
Save