Skip to content

Commit

Permalink
Update benchee script
Browse files Browse the repository at this point in the history
  • Loading branch information
kipcole9 committed Apr 10, 2020
1 parent 938001d commit e838222
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bench/to_string.exs
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{:ok, options} = Cldr.Number.Format.Options.validate_options([], MyApp.Cldr, locale: Cldr.get_locale())

Benchee.run(
%{
"keyword options" => fn -> MyApp.Cldr.Number.to_string 10000 end,
"Number to_string" => fn -> MyApp.Cldr.Number.to_string 10000.55 end,
"Number to_string preformatted options" => fn -> MyApp.Cldr.Number.to_string 10000.55, options end,
"Float to_string" => fn -> Float.to_string 10000.55 end
},
time: 10,
memory_time: 2
Expand Down

0 comments on commit e838222

Please sign in to comment.