Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

put_all/get_all do not increment telemetry stats #62

Open
jdobrzanski opened this issue Sep 3, 2024 · 0 comments
Open

put_all/get_all do not increment telemetry stats #62

jdobrzanski opened this issue Sep 3, 2024 · 0 comments

Comments

@jdobrzanski
Copy link

Nebulex Redis Adapter: 2.4.0
Elixir: 1.17.2
Erlang: OTP 27

Example:

iex> MyApp.RedisCache.put("test", "test")
:ok
iex> MyApp.RedisCache.stats
%Nebule.Stats{
  measurements: %{
    updates: 0,
    evictions: 0,
    expirations: 0,
    hits: 0,
    misses: 0,
    writes: 1
  }
  ...
}
iex> MyApp.RedisCache.get("test")
"test"
iex> MyApp.RedisCache.stats
%Nebule.Stats{
  measurements: %{
    updates: 0,
    evictions: 0,
    expirations: 0,
    hits: 1,
    misses: 0,
    writes: 1
  }
  ...
}
iex> MyApp.RedisCache.put_all([{"test2", "test"}])
:ok
iex> MyApp.RedisCache.stats
%Nebule.Stats{
  measurements: %{
    updates: 0,
    evictions: 0,
    expirations: 0,
    hits: 1,
    misses: 0,
    writes: 1
  }
  ...
}
iex> MyApp.RedisCache.get_all(["test2"])
%{"test2" => "test"}
iex> MyApp.RedisCache.stats
%Nebule.Stats{
  measurements: %{
    updates: 0,
    evictions: 0,
    expirations: 0,
    hits: 1,
    misses: 0,
    writes: 1
  }
  ...
}

Note that Caches that use the built in Nebulex.Adapters.Localadapter do increment the stats for get_all/put_all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant