LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-03-2008, 12:20 PM   #1
JavaNinja
Member
 
Registered: Sep 2008
Posts: 90

Rep: Reputation: 15
Question FFmpeg performance testing


Hello all,

I am doing some performance testing on ffmpeg and how long it takes for it to convert different video formats of different sizes on my server. I have written a shell script to do this with help from this forum.

Now, I would like to determine how much processing power it takes. Is there a way I can do this? Maybe make use of the PID of the process I am running and get how much process power its using? Is this not a good test on performance since there are too many factors to consider?

Thanks all
 
Old 12-03-2008, 12:24 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Linux Mint 17, Linux Mint 18
Posts: 7,809

Rep: Reputation: 294Reputation: 294Reputation: 294
You could use the time command:

http://linux.die.net/man/1/time

------------------------
Steve Stites
 
Old 12-03-2008, 01:00 PM   #3
JavaNinja
Member
 
Registered: Sep 2008
Posts: 90

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jailbait View Post
You could use the time command:
Hey jailbait,

I have done the timing part already, now I am trying to find a way to work out how much processing power it requires, is this possible to determine?
 
Old 12-03-2008, 01:06 PM   #4
jstephens84
Senior Member
 
Registered: Sep 2004
Location: Nashville
Distribution: Manjaro, RHEL, CentOS
Posts: 2,098

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by JavaNinja View Post
Hey jailbait,

I have done the timing part already, now I am trying to find a way to work out how much processing power it requires, is this possible to determine?
You could possibly use the pid to get the cpu % being used based on the average time and placing say a sleep command so that it will get the percentage more than once. So maybe create an array that will hold the percentages.
 
Old 12-03-2008, 02:48 PM   #5
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Linux Mint 17, Linux Mint 18
Posts: 7,809

Rep: Reputation: 294Reputation: 294Reputation: 294
Quote:
Originally Posted by JavaNinja View Post
Hey jailbait,

I have done the timing part already, now I am trying to find a way to work out how much processing power it requires, is this possible to determine?
The time command gives you CPU time usage split between user and sys time. Add the user and sys times and you will get how much CPU time was used.

--------------------
Steve Stites
 
Old 12-03-2008, 09:23 PM   #6
JavaNinja
Member
 
Registered: Sep 2008
Posts: 90

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jailbait View Post
The time command gives you CPU time usage split between user and sys time. Add the user and sys times and you will get how much CPU time was used.
Ah ok I see, will it be able to do milliseconds? I currenty use:

Code:
line="$@" # get all args

START=$(date +%s.%N)
	
eval $line /dev/null 2>&1 

END=$(date +%s.%N)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Testing bonding performance with scp bcg121 Linux - Networking 9 08-14-2010 09:44 AM
What are the Tools used for Testing the performance of C and C++ programs under linux maradnus Programming 4 11-18-2008 02:51 PM
testing iptables performance testing pavan.daemon Linux - Networking 2 09-28-2007 05:22 PM
Testing the kernel performance gangaraju Fedora 4 03-06-2006 01:17 AM
Samba Performance Testing (an Observation) soopafresh Linux - Networking 0 08-12-2004 03:01 PM


All times are GMT -5. The time now is 05:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration