-rprofile output

P

Piotr S.

I can't figure out how to redirect -rprofile's command output to a file.
Every time it just outputs stuff from the program not from the profile.
I'm asking this because it writes so much stuff that I can't even scroll
through it all so the most important things aren't visible.
 
R

Robert Klemme

I can't figure out how to redirect -rprofile's command output to a file.
Every time it just outputs stuff from the program not from the profile.
I'm asking this because it writes so much stuff that I can't even scroll
through it all so the most important things aren't visible.

You need to redirect stderr:

15:15:58 ~$ ruby19 -r profile -e '1000.times { 2 + 3 }' 1>/dev/null
% cumulative self self total
time seconds seconds calls ms/call ms/call name
100.00 0.02 0.02 1 16.00 16.00 Integer#times
0.00 0.02 0.00 1000 0.00 0.00 Fixnum#+
0.00 0.02 0.00 1 0.00 16.00 #toplevel
15:16:01 ~$ ruby19 -r profile -e '1000.times { 2 + 3 }' 2>/dev/null
15:16:13 ~$

Cheers

robert
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,142
Messages
2,570,818
Members
47,362
Latest member
eitamoro

Latest Threads

Top