File: Profiling.md

package info (click to toggle)
cjs 128.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,872 kB
  • sloc: cpp: 34,377; javascript: 27,762; ansic: 13,033; sh: 1,611; python: 780; xml: 116; makefile: 38
file content (28 lines) | stat: -rw-r--r-- 564 bytes parent folder | download | duplicates (5)
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/)