summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorfurunkel <[email protected]>2015-04-24 21:58:27 +0200
committerfurunkel <[email protected]>2015-04-24 21:58:27 +0200
commit6110b385a7d53655fb74ef9fb19497b2111ce42c (patch)
tree194ba2a697e319c03b902d011418579d7cd330d2
parent105f1f38a969bbe0e0ee1041c3c315a56bdc8c47 (diff)
downloadmruby-6110b385a7d53655fb74ef9fb19497b2111ce42c.tar.gz
mruby-6110b385a7d53655fb74ef9fb19497b2111ce42c.zip
Output PNG instead of PDF
-rw-r--r--.gitignore1
-rw-r--r--benchmark/plot.gpl2
-rw-r--r--tasks/benchmark.rake11
3 files changed, 7 insertions, 7 deletions
diff --git a/.gitignore b/.gitignore
index e3f434432..1a8c5990c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,6 +4,7 @@
*.o
/benchmark/**/*.dat
/benchmark/*.pdf
+/benchmark/*.png
*.orig
*.pdb
*.rej
diff --git a/benchmark/plot.gpl b/benchmark/plot.gpl
index 21a55dd3d..725e2ec1c 100644
--- a/benchmark/plot.gpl
+++ b/benchmark/plot.gpl
@@ -1,5 +1,5 @@
set yrange [0:]
-set terminal pdf font 'Sans, 3'
+set terminal pngcairo font 'Sans, 8' lw 1 size 1400,1024
set xtics rotate by -45
set style histogram errorbars gap 2 lw 1
set style fill solid border -1
diff --git a/tasks/benchmark.rake b/tasks/benchmark.rake
index 97b2e7448..84e69ebee 100644
--- a/tasks/benchmark.rake
+++ b/tasks/benchmark.rake
@@ -8,10 +8,6 @@ def bm_files
Dir.glob("#{MRUBY_ROOT}/benchmark/bm_*.rb")
end
-def plot_file
- File.join(MRUBY_ROOT, 'benchmark', 'bm.pdf')
-end
-
def build_config_name
if ENV['MRUBY_CONFIG']
File.basename(ENV['MRUBY_CONFIG'], '.rb').gsub('build_config_', '')
@@ -20,13 +16,17 @@ def build_config_name
end
end
+def plot_file
+ File.join(MRUBY_ROOT, 'benchmark', "#{build_config_name}.png")
+end
+
def plot
opts_file = "#{MRUBY_ROOT}/benchmark/plot.gpl"
opts = File.read(opts_file).each_line.to_a.map(&:strip).join(';')
dat_files = $dat_files.group_by {|f| File.dirname(f).split(File::SEPARATOR)[-1]}
- opts += ";set output '#{File.join(MRUBY_ROOT, 'benchmark', "#{build_config_name}.pdf")}'"
+ opts += ";set output '#{plot_file}'"
opts += ';plot '
@@ -37,7 +37,6 @@ def plot
cmd = %Q{gnuplot -p -e "#{opts}"}
- p cmd
IO.popen(cmd, 'w') do |p|
dat_files.each do |target_name, bm_files|
p.puts target_name.gsub('_', '-')