File: README.md

package info (click to toggle)
ruby-rmagick 6.0.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,232 kB
  • sloc: cpp: 19,563; ruby: 17,147; sh: 88; javascript: 36; makefile: 13
file content (50 lines) | stat: -rw-r--r-- 1,131 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# How to measure the memory usage

## 1. Install gnuplot
If you need a graph of memory usage, it can draw the graph with `gnuplot`.

With `Homebrew`, you can install `gnuplot` like

```
$ brew install gnuplot
```

## 2. Retrieve two performance data `before` / `after`
Retrieve data before applying patches.

```
$ rake build
$ gem install pkg/rmagick-3.1.0.gem
$ cd benchmarks/memory
$ ruby image_new.rb > before.csv
```

Apply the patches then retrieve improved data.

```
$ rake build
$ gem install pkg/rmagick-3.1.0.gem
$ cd benchmarks/memory
$ ruby image_new.rb > after.csv
```

## 3. Draw the performance graph
Launch `gnuplot` and execute `load 'rmagick.gnuplot'` command in prompt then the performance graph will be drew.

```
$ cd benchmarks/memory
$ gnuplot

	G N U P L O T
	Version 5.2 patchlevel 7    last modified 2019-05-29

	Copyright (C) 1986-1993, 1998, 2004, 2007-2018
	Thomas Williams, Colin Kelley and many others

	gnuplot home:     http://www.gnuplot.info
	faq, bugs, etc:   type "help FAQ"
	immediate help:   type "help"  (plot window: hit 'h')

Terminal type is now 'qt'
gnuplot> load 'rmagick.gnuplot'
```