summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/handle_lat.h
diff options
context:
space:
mode:
authorXavier Simonart <xavier.simonart@intel.com>2019-12-29 18:41:50 +0100
committerXavier Simonart <xavier.simonart@intel.com>2020-01-29 12:12:27 +0100
commit7ef348cff20a6d35fe36bb551e5b1aaa69eded1a (patch)
treeeb3570fbdabd29f6af9e0d695ea8fbd7c8c8f5a5 /VNFs/DPPD-PROX/handle_lat.h
parenta984177b93bd59fec43da19193b8ee5204d92e00 (diff)
Add Latency Distribution display
- Latency Distribution (i.e. histograms) has been added when latency is enabled. - Histograms are now compiled by default. - A bug has also been fixed, which was causing strange behavior in the histograms (due to bucket size being overwritten). - The default bucket size has been changed to "11" which means that the size of each bucket is now (1 cycle << 11) = 2048 cycles = 1 microsecond at 2GHz. It was (1 << (10 - 1)). As there are 128 latency buckets, it is not possible to show all of them on the display. Hence the latency buckets are displayed based on on the assumption that the minimum latency is usually relatively stable and that the maximum latency change more often. - The first empty buckets are not shown (i.e. buckets empty for all tasks) - If more than 15 buckets are non empty, then the buckets are combined, so that a maximum of 15 (bigger) buckets are shown - If less than 15 buckets are non empty, the following (empty) buckets are shown (this avoid seeing every x seconds some columns being added and removed). Change-Id: I27fe6ac0e513a5558e42ff2e74255c55ba79516d Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
Diffstat (limited to 'VNFs/DPPD-PROX/handle_lat.h')
-rw-r--r--VNFs/DPPD-PROX/handle_lat.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/VNFs/DPPD-PROX/handle_lat.h b/VNFs/DPPD-PROX/handle_lat.h
index 46f5e7d4..da164656 100644
--- a/VNFs/DPPD-PROX/handle_lat.h
+++ b/VNFs/DPPD-PROX/handle_lat.h
@@ -1,5 +1,5 @@
/*
-// Copyright (c) 2010-2017 Intel Corporation
+// Copyright (c) 2010-2019 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -30,6 +30,8 @@
// 8192 packets is equivalent to 550 micro-seconds at 10Gbps for 64 bytes packets
#define ACCURACY_WINDOW 8192
+#define LAT_BUCKET_COUNT 128
+
struct lat_test {
uint64_t tot_all_pkts;
uint64_t tot_pkts;
@@ -44,7 +46,7 @@ struct lat_test {
uint64_t tot_lat_error;
unsigned __int128 var_lat_error;
- uint64_t buckets[128];
+ uint64_t buckets[LAT_BUCKET_COUNT];
uint64_t bucket_size;
uint64_t lost_packets;
};
@@ -186,6 +188,7 @@ static void lat_test_copy(struct lat_test *dst, struct lat_test *src)
struct task_lat;
struct lat_test *task_lat_get_latency_meassurement(struct task_lat *task);
+uint32_t task_lat_get_latency_bucket_size(struct task_lat *task);
void task_lat_use_other_latency_meassurement(struct task_lat *task);
void task_lat_set_accuracy_limit(struct task_lat *task, uint32_t accuracy_limit_nsec);