Skip to content

Instantly share code, notes, and snippets.

@MarioAriasC
Last active January 23, 2023 07:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MarioAriasC/599204342860a161d4fe12b12f0d3de9 to your computer and use it in GitHub Desktop.
Save MarioAriasC/599204342860a161d4fe12b12f0d3de9 to your computer and use it in GitHub Desktop.
# frozen_string_literal: true
require 'unicode_plot'
require 'json'
hf_json = JSON.parse(File.read(ARGV[0]))
hf_results = hf_json["results"]
hf_barplot_data = {}
hf_results.each do |result|
command = result["command"]
hf_barplot_data[command] = result["mean"]
end
UnicodePlot.barplot(width: 100, data: hf_barplot_data, title: "").render
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment