---
name: "mprof_merge_runs"
section: "1"
platform: "linux"
package: "mercury"
version: "0.10.1-3"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/mprof_merge_runs"
---

# mprof\_merge\_runs(1)

Mercury Profiling utility

```

```

## NAME

mprof\_merge\_runs - Mercury Profiling utility

## DESCRIPTION

mprof\_merge\_runs merges the profiling data from different runs of a profiled Mercury program, for use by \`mprof'.

## SYNOPSIS

```
 First, compile with profiling enabled:
```

```
	mmc --profiling my_program
```

```
 Then, collect the profiling data:
```

```
	./my_program  args for first run
	mprof_merge_runs
	./my_program  args for second run
	mprof_merge_runs
	./my_program  args for third run
	mprof_merge_runs
```

```
 Finally, display the profile:
```

```
	mprof -c | more
```

```
 Note:
```

```
	If you just want to run your program N times with
	the same arguments, a simpler way of achieving this
	is to instead use the `-r<N>' ("repeat N times")
	option to the Mercury runtime, which you can pass by
	setting the environment variable MERCURY_OPTIONS, e.g.
		env MERCURY_OPTIONS=-r100 ./my_program
```

## NOTES

*mprof\_merge\_runs* is one of the development tools that are part of the Mercury distribution.

This manual page is limited to a brief summary. For further information see the Mercury User's Guide.

```

```

## OPTIONS

```
 -h, --help
```

```
	Print this help message.
```

## AUTHORS

The Mercury team.

See \<http://www.cs.mu.oz.au/mercury/contact/people.html\>.

## COPYRIGHT

This program and its documentation are copyright by the University of Melbourne. They may be copied only under the terms of the GNU General Public License - see the file COPYING in the Mercury distribution.

## SEE ALSO

\<http://www.cs.mu.oz.au/mercury/information/documentation.html\>

The Mercury User's Guide.

The GNU General Public License.
