File: Profiling.md

package info (click to toggle)
gjs 1.86.0-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 6,724 kB
  • sloc: cpp: 39,075; javascript: 30,720; ansic: 15,971; sh: 1,759; python: 772; xml: 135; makefile: 40
file content (28 lines) | stat: -rw-r--r-- 564 bytes parent folder | download | duplicates (6)
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
# Profiling

## Sysprof

Typical profiling of JavaScript code is performed by passing the `--gjs` and
`--no-perf` options:

```sh
$ sysprof-cli --gjs --no-perf -- gjs script.js
```

This will result in a `capture.syscap` file in the current directory, which can
then be reviewed in the sysprof GUI:

```sh
$ sysprof capture.syscap
```

Other flags can also be combined with `--gjs` when appropriate:

```sh
sysprof-cli --gjs --gtk -- gjs gtk.js
```

#### See Also

* Christian Hergert's [Blog Posts on Sysprof](https://blogs.gnome.org/chergert/category/sysprof/)