Add read/write metrics to TimedValueMarshaller

The following metrics were added:
* cache/chroniclemap/store_serialize_latency_<cache-name> the latency of
  serializing entries in chronicle-map store
* cache/chroniclemap/store_deserialize_latency_<cache-name> the latency
  of deserializing entries in chronicle-map store

Notes:
* metrics are not serializable hence as such they have to be transient
* in case 'readResolve' method is used instead of constructor fallback
  to metrics cache to get metrics; it is safe operation as store is
  created only after the TimeValueMarshaller is created for a cache in
  question hence metricsCache is going to have the corresponding entry

Change-Id: I195d83d4ebf351ad82925130d4e0c77231c3ec07
6 files changed
tree: 0082f305a8677556f9930da98759e0dde856cc38
  1. src/
  2. .gitignore
  3. BUILD
  4. external_plugin_deps.bzl
  5. Jenkinsfile
  6. LICENSE
  7. README.md
README.md

Persistent cache for Gerrit, based on ChronicleMap

Non-blocking and super-fast on-disk cache libModule for Gerrit Code Review based on ChronicleMap on-disk implementation.

How to build

This libModule is built like a Gerrit in-tree plugin, using Bazelisk. See the build instructions for more details.

Setup

  • Install cache-chronicalmap module

Install the chronicle-map module into the $GERRIT_SITE/lib directory.

Add the cache-chroniclemap module to $GERRIT_SITE/etc/gerrit.config as follows:

[gerrit]
  installModule = com.googlesource.gerrit.modules.cache.chroniclemap.ChronicleMapCacheModule

For further information and supported options, refer to config documentation.

Migration from H2 caches

You can check how to migrate from H2 to chronicle-map here.