[Tarantool-patches] [RFC v4] rfc: luajit metrics

Sergey Kaplun skaplun at tarantool.org
Wed Oct 7 17:46:11 MSK 2020


On 05.10.20, Sergey Kaplun wrote:
> Part of #5187
> ---
> 
> This patch adds RFC to LuaJIT metrics interfaces. Nevertheless name
> `misc` for builtin library is not good and should be discussed, because
> tons of user modules can use that name for their own libraries.
> 
> Branch: https://github.com/tarantool/tarantool/tree/skaplun/5187-luajit-metrics
> Issue: https://github.com/tarantool/tarantool/issues/5187
> 
> Changes in v2:
> - Fixed typos
> - Made comments more verbose
> - Avoided flushing any of metrics after each call of luaM_metrics()
> Changes in v3:
> - Added colors count metrics description
> - Added description about how metrics are collected
> - Added benchmarks
> Changes in v3:

v4 of course

> - Removed colors count metrics

<snipped>

> -- 
> 2.28.0
> 

Update patch considering to Igor's comments (see also [1]).
Iterative patch in the bottom. Branch force-pushed.

===================================================================
diff --git a/doc/rfc/5187-luajit-metrics.md b/doc/rfc/5187-luajit-metrics.md
index 02f5b559f..988b049fb 100644
--- a/doc/rfc/5187-luajit-metrics.md
+++ b/doc/rfc/5187-luajit-metrics.md
@@ -42,9 +42,12 @@ The `struct luam_Metrics` has the following definition:
 
 ```c
 struct luam_Metrics {
-  /* Strings amount found in string hash instead of allocation of new one. */
+  /*
+  ** Number of strings being interned (i.e. the string with the
+  ** same payload is found, so a new one is not created/allocated).
+  */
   size_t strhash_hit;
-  /* Strings amount allocated and put into string hash. */
+  /* Total number of strings allocations during the platform lifetime. */
   size_t strhash_miss;
 
   /* Amount of allocated string objects. */
@@ -73,8 +76,7 @@ struct luam_Metrics {
 
   /*
   ** Overall number of snap restores (amount of guard assertions
-  ** leading to stopping trace executions and trace exits,
-  ** that are not stitching with other traces).
+  ** leading to stopping trace executions).
   */
   size_t jit_snap_restore;
   /* Overall number of abort traces. */
===================================================================

[1]: https://lists.tarantool.org/pipermail/tarantool-patches/2020-October/019947.html

-- 
Best regards,
Sergey Kaplun


More information about the Tarantool-patches mailing list