Athunnea

Athunnea

I was trying to run Benchee in Livebook, was getting Error trying to determine erlang version enoent. Works fine in console. Anyone had this?

Benchee 1.1.0
Livebook 0.9
Elixir 1.14.2
Erlang 25.2
Macos 12.6.3

Logs:

23:26:07.968 [error] GenServer #PID<0.258.0> terminating
** (FunctionClauseError) no function clause matching in String.graphemes/1
    (elixir 1.14.2) lib/string.ex:1902: String.graphemes(:ok)
    (benchee 1.1.0) lib/benchee/utility/erlang_version.ex:100: Benchee.Utility.ErlangVersion.parse_erlang_version/1
    (benchee 1.1.0) lib/benchee/utility/erlang_version.ex:84: Benchee.Utility.ErlangVersion.includes_fixes_from?/2
    (benchee 1.1.0) lib/benchee/benchmark/repeated_measurement.ex:60: Benchee.Benchmark.RepeatedMeasurement.determine_resolution_adjustment/2
    (benchee 1.1.0) lib/benchee/benchmark/repeated_measurement.ex:42: Benchee.Benchmark.RepeatedMeasurement.determine_n_times/5
    (benchee 1.1.0) lib/benchee/benchmark/runner.ex:226: Benchee.Benchmark.Runner.measure_runtimes/4
    (benchee 1.1.0) lib/benchee/benchmark/runner.ex:102: Benchee.Benchmark.Runner.measure_scenario/2
    (elixir 1.14.2) lib/task/supervised.ex:89: Task.Supervised.invoke_mfa/2
Last message: {:DOWN, #Reference<0.447263386.2991587331.105744>, :process, #PID<0.257.0>, {:function_clause, [{String, :graphemes, [:ok], [file: 'lib/string.ex', line: 1902]}, {Benchee.Utility.ErlangVersion, :parse_erlang_version, 1, [file: 'lib/benchee/utility/erlang_version.ex', line: 100]}, {Benchee.Utility.ErlangVersion, :includes_fixes_from?, 2, [file: 'lib/benchee/utility/erlang_version.ex', line: 84]}, {Benchee.Benchmark.RepeatedMeasurement, :determine_resolution_adjustment, 2, [file: 'lib/benchee/benchmark/repeated_measurement.ex', line: 60]}, {Benchee.Benchmark.RepeatedMeasurement, :determine_n_times, 5, [file: 'lib/benchee/benchmark/repeated_measurement.ex', line: 42]}, {Benchee.Benchmark.Runner, :measure_runtimes, 4, [file: 'lib/benchee/benchmark/runner.ex', line: 226]}, {Benchee.Benchmark.Runner, :measure_scenario, 2, [file: 'lib/benchee/benchmark/runner.ex', line: 102]}, {Task.Supervised, :invoke_mfa, 2, [file: 'lib/task/supervised.ex', line: 89]}]}}
State: %{buffer: ["\e[31m\n23:26:07.967 [error] Task #PID<0.259.0> started from #PID<0.257.0> terminating\n** (FunctionClauseError) no function clause matching in String.graphemes/1\n    (elixir 1.14.2) lib/string.ex:1902: String.graphemes(:ok)\n    (benchee 1.1.0) lib/benchee/utility/erlang_version.ex:100: Benchee.Utility.ErlangVersion.parse_erlang_version/1\n    (benchee 1.1.0) lib/benchee/utility/erlang_version.ex:84: Benchee.Utility.ErlangVersion.includes_fixes_from?/2\n    (benchee 1.1.0) lib/benchee/benchmark/repeated_measurement.ex:60: Benchee.Benchmark.RepeatedMeasurement.determine_resolution_adjustment/2\n    (benchee 1.1.0) lib/benchee/benchmark/repeated_measurement.ex:42: Benchee.Benchmark.RepeatedMeasurement.determine_n_times/5\n    (benchee 1.1.0) lib/benchee/benchmark/runner.ex:226: Benchee.Benchmark.Runner.measure_runtimes/4\n    (benchee 1.1.0) lib/benchee/benchmark/runner.ex:102: Benchee.Benchmark.Runner.measure_scenario/2\n    (elixir 1.14.2) lib/task/supervised.ex:89: Task.Supervised.invoke_mfa/2\nFunction: #Function<2.21877062/0 in Benchee.Utility.Parallel.map/2>\n    Args: []\n\e[0m", "Benchmarking a ...\n", "Benchmark suite executing with the following configuration:\nwarmup: 2 s\ntime: 5 s\nmemory time: 0 ns\nreduction time: 0 ns\nparallel: 1\ninputs: none specified\nEstimated total run time: 7 s\n\n", "Operating System: macOS\nCPU Information: Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz\nNumber of Available Cores: 8\nAvailable memory: 16 GB\nElixir 1.14.2\nErlang ok\n\n", "Error trying to determine erlang version enoent\n"], ebin_path: "/var/folders/3z/cr46pg1x64dby064g5971brm0000gn/T/livebook_runtime/m3mc7n4tfo5rx6gl56rmvbbmtvl5rau3/ebin", encoding: :unicode, evaluator: #PID<0.257.0>, evaluator_monitor: #Reference<0.447263386.2991587331.105744>, file: "#cell:dy6feawyxgmazuduzsh53dl5lertircg", input_cache: %{}, modules_defined: MapSet.new([]), object_tracker: #PID<0.141.0>, ref: "dy6feawyxgmazuduzsh53dl5lertircg", runtime_broadcast_to: #PID<11893.910.0>, send_to: #PID<11893.909.0>, token_count: 0, tracer_info: %Livebook.Runtime.Evaluator.Tracer{modules_used: MapSet.new([Benchee, Kernel, :erlang]), modules_defined: %{}, aliases_used: MapSet.new([Benchee]), aliases_defined: %{}, requires_used: MapSet.new([]), requires_defined: MapSet.new([]), imports_used?: true, imports_defined?: false, undefined_vars: MapSet.new([])}}

Showing Posts 1 to 8

mayel

mayel

Can you see your erlang version when running Benchee.System.system(%Benchee.Suite{}) in livebook?

Athunnea

Athunnea OP

From Livebook

%Benchee.Suite{
  system: %{
    erlang: :ok,

From console:

%Benchee.Suite{
  system: %{
    erlang: "25.2",
Athunnea

Athunnea OP

delete

mayel

mayel

Seems to be an issue in this function then (which already has a comment about a workaround for livebook): benchee/lib/benchee/system.ex at main · bencheeorg/benchee · GitHub

What happens when you run :erlang.system_info(:otp_release) ?

Athunnea

Athunnea OP

> :erlang.system_info(:otp_release)
'25'

> System.build_info()
%{
  build: "1.14.2 (compiled with Erlang/OTP 25)",
  date: "2022-11-11T11:39:40Z",
  otp_release: "25",
  revision: "0909940",
  version: "1.14.2"
}

By the way, it’s a compiled Livebook App, i don’t know if it carries its own erlang/elixir or uses one from my system

mayel

mayel

Ah then I’d check if you’re using the latest version of benchee, you may not have one that implements that workaround.

Athunnea

Athunnea OP

Thanks! Seems that patch hasn’t been released yet

Athunnea

Athunnea OP

I have switched to benchee from the master branch, it works in Livebook. Hope they release it.

Thanks @mayel

— All posts loaded —

Where Next? Top

Trending in Questions Top

RSP87
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
nseaSeb
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
kpanic
Hi everyone, I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding. I sta...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
velrest
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
asweet-confluent
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
ryanwinchester
apply_graft/2 doesn’t rewrite an add_many sub-workflow’s deps on an add step. Grafted jobs cancel with “upstream job was deleted” Version...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
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
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
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

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews