• P
    perf stat: Change noise calculation to use stddev · 506d4bc8
    Peter Zijlstra 提交于
    The current noise computation does:
    
     \Sum abs(n_i - avg(n)) * N^-1.5
    
    Which is (afaik) not a regular noise function, and needs the
    complete sample set available to post-process.
    
    Change this to use a regular stddev computation which can be
    done by keeping a two sums:
    
     stddev = sqrt( 1/N (\Sum n_i^2) - avg(n)^2 )
    
    For which we only need to keep \Sum n_i and \Sum n_i^2.
    Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: <stable@kernel.org>
    LKML-Reference: <new-submission>
    Signed-off-by: NIngo Molnar <mingo@elte.hu>
    506d4bc8
builtin-stat.c 12.5 KB