[FFmpeg-devel] [PATCH] print memory usage with -benchmark

Reimar Döffinger Reimar.Doeffinger
Mon Feb 22 20:33:25 CET 2010


On Sun, Feb 21, 2010 at 02:17:09PM -0200, Ramiro Polla wrote:
> On Sun, Feb 21, 2010 at 8:51 AM, Reimar D?ffinger
> <Reimar.Doeffinger at gmx.de> wrote:
> > @@ -4029,7 +4052,8 @@
> >          av_exit(1);
> >      ti = getutime() - ti;
> >      if (do_benchmark) {
> > -        printf("bench: utime=%0.3fs\n", ti / 1000000.0);
> > +        int maxrss = getmaxrss() / 1024;
> > +        printf("bench: utime=%0.3fs maxrss=%ikB\n", ti / 1000000.0, maxrss);
> 
> It might be better to only print maxrss if it's nonzero:
> 
> int maxrss = getmaxrss() / 1024;
> printf("bench: utime=%0.3fs", ti / 1000000.0);
> if (maxrss)
>     printf(" maxrss=%ikB", maxrss);
> printf("\n");

Why? Seems to me like more code for no advantage.
And not only more code in FFmpeg but probably also in every application
that wants to parse the output.
For human consumption I doubt this is not useful without documentation
(or reading the source or asking someone...) anyway.



More information about the ffmpeg-devel mailing list