mguimas
Hello,
Even though I have already done mix clean --all --deps, I still get the next message from Benchee:
Not all of your protocols have been consolidated. In order to achieve the
best possible accuracy for benchmarks, please ensure protocol
consolidation is enabled in your benchmarking environment.
What do I have to do to remove this message?
I am using
$ elixir --version
Erlang/OTP 26 [erts-14.2.1] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [jit:ns]Elixir 1.16.0 (compiled with Erlang/OTP 26)
and have the following line in my mix.exs
{:benchee, "~> 1.3", only: [:dev, :test]}
Also, I am running mix test and calling Benchee from a compiled function called from a test.
Thanks
Trending in Questions
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
Hello,
I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 8- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
PragTob
Hi there,
sounds like your protocols aren’t consolidated - I’m not 100% sure but it may be that you have protocols defined in
.exsfiles and hence they aren’t consolidated? There is some more information here: Protocol — Elixir v1.16.1benchee checks all protocols for consolidation: benchee/lib/benchee/system.ex at d1228710390ee9d871a7b31e8e458a4b334c7790 · bencheeorg/benchee · GitHub
Maybe you’ve also disabled it in test (as mentioned in the article there).
It’s hard to tell without a code base to access. Right now that warning message can’t be deactivated as it’s one of our “hard warnings” I’d say. Might be persuaded to add a deactivation for it, but generally speaking all protocols should be consolidated for benchmarking.
mguimas
Hello,
if I start an IEx session with
MIX_ENV=test iex -S mixand then run some of the code in the Benchee’s link you gave above, I getSo, none of the above protocols are consolidated, but they are also not my own protocols.
I suppose there is something more general missing in my setting …
mguimas
@PragTob Ok, maybe I should clone Benchee and see what is bing passed to the function
all_protocols_consolidated?/1to see what is going on …dimitarvp
The link to the Elixir docs shows that usually projects disable protocol consolidation in the
testenv – have you checked if that’s true for your project?mguimas
I went to check that, and guess what, I had this in my
mix.exs:consolidate_protocols: Mix.env() != :testI did not go there before because I don’t remember to have added that myself to the
mix.exsfile.Perhaps this is some default added when the project was created some time ago?
Thanks a lot people!!
dimitarvp
Did the warning go away after you made sure test env consolidates protocols?
mguimas
YES !!
It consolidated all protocols in all files that get compiled in the test environment. I did not check if it consolidated protocols implemented by modules in
.exsfiles (it is not my use case).dimitarvp
Nice. Glad we could help.