1 // Copyright 2018 The Fuchsia Authors
2 //
3 // Use of this source code is governed by a MIT-style
4 // license that can be found in the LICENSE file or at
5 // https://opensource.org/licenses/MIT
6 
7 // These are helper routines used to implement `k counters`, exposed
8 // here only for testing purposes. See the implementation for details.
9 
10 #pragma once
11 
12 #include <stddef.h>
13 #include <stdint.h>
14 #include <zircon/compiler.h>
15 
16 __BEGIN_CDECLS
17 
18 void counters_clean_up_values(const uint64_t* values_in, uint64_t* values_out, size_t* count_out);
19 uint64_t counters_get_percentile(const uint64_t* values, size_t count, uint64_t percentage_dot8);
20 bool counters_has_outlier(const uint64_t* values_in);
21 
22 __END_CDECLS
23