File: PROFILING.md

package info (click to toggle)
analizo 1.25.5-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,888 kB
  • sloc: perl: 3,325; cpp: 1,780; ansic: 663; cs: 378; java: 265; sh: 104; makefile: 89
file content (46 lines) | stat: -rw-r--r-- 1,067 bytes parent folder | download | duplicates (3)
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
# Profiling analizo

Run the desired command under the profiler:

```console
analizo=/path/to/analizo
perl -d:DProf -I$analizo/lib $analizo/lib/Analizo/Command/COMMAND
```

Process the profiler output (this has to be run from the same directory where
you run the profiler):

```console
dprofpp
```

## Using Devel::NYTProf

Run the desired command under the profiler:

```console
COMMAND=metrics SOURCE=t/samples/hello_world/cpp/ perl profile.pl
```

Process the profiler output (this has to be run from the same directory where
you run the profiler) in HTML format:

```console
nytprofhtml --open
```

You can run profiler running analizo over any source-code you want
by passing via command line argument or $SOURCE variable, eg:

```console
SOURCE=t/samples/hello_world/cpp/ perl profile.pl
```

```console
perl profile.pl t/samples/hello_world/cpp/
```

* [Profiling Perl](http://www.perl.com/pub/2004/06/25/profiling.html), by Simon
  Cozens
* [Devel::NYTProf - Profiling Perl code](https://www.perl.org/about/whitepapers/perl-profiling.html),
  by Leo Lapworth