From 7dbd38aa201bc65a00b6bf0c39be4257ab20412c Mon Sep 17 00:00:00 2001 From: Adithya Kumar Date: Mon, 23 Oct 2023 22:09:02 +0530 Subject: [PATCH] Add a note about the methods of performance analisys --- dev/Methods.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 dev/Methods.md diff --git a/dev/Methods.md b/dev/Methods.md new file mode 100644 index 0000000..4a7b58f --- /dev/null +++ b/dev/Methods.md @@ -0,0 +1,38 @@ +# Methods + +There are 2 methods of measuring accurate haskell performance. + +## Eventlog method + +__Pros__: + +- Enables us to perform extensive analisys. + - We can understand the state of the system completely at any given time. + - We can make more elaborate windows. + - We can see all the other threads in a given window. + - The windows are not confined to a single thread. +- Relatievely less invasive change in the RTS. + +__Cons__: + +- Overhead of measurement is more. +- Collecting metrics while the app is running in production is not straight. + forward and requires more moving parts. + +## ThreadCPUTime primop method + +__Pros__: + +- Low measurement overhead. +- Collecting metrics in production is straight forward. + +__Cons__: + +- Relatively more invasive. +- Very simple analisys. Relative analisys isn't possible to understand the system. + +__Implementation detail__: + +- We need to hang the perfomance counters block from the TSO. +- On every tield we can update the perf counters. +- To get the updated value of the counter we need to yield.