10-28-2008
How to get the time cost of functions?
hi,
There is a shell including many functions, when I run ksh -x/-v to see the call sequence, but how do I know which function cost more?
Of course, use time CMD to get the scripts runnning time, while it can not tell me which cost more.
Thanks very much.
5 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Can Anyone Tell Me The Cost Of UNIX As I'm Considering Finally Getting Rid Of This Rubbish Windows Based OS. I Would Also Like To Know Anyones Opinions On The Best Free Version,
Thanks. (1 Reply)
Discussion started by: OSNovice
1 Replies
2. Programming
Hello to anyone who can help me!
I am in need of some help in procuring a more exact timing scheme in C for use with gcc.
I manage to get a timing in seconds just fine using difftime(). However, I need more accurate.. milliseconds... no clue.
Please help?
Brian (2 Replies)
Discussion started by: bcowan
2 Replies
3. UNIX for Dummies Questions & Answers
I wanted to learn UNIX & Shell Programming.Now i want material at free of cost.Where can i get ...tell me the SItes to get the tutorials (3 Replies)
Discussion started by: hairamu
3 Replies
4. UNIX for Advanced & Expert Users
It is a little bit weird to me when i found this on a solaris 9 system with openssh package. Below is the result copied from "top" output:
PID USERNAME LWP PRI NICE SIZE RES STATE TIME CPU COMMAND
13491 root 1 59 0 27M 18M sleep 0:06 0.00% sshd -i
20198 root ... (1 Reply)
Discussion started by: sleepy_11
1 Replies
5. Shell Programming and Scripting
I have 7 functions those need to be executed as command line inputs, I tried with below code it’s not executing function. If I run the ./script 2 then fun2 should execute , how to initiate that function I tried case and if else also, how to initiate function from command line
if
then... (8 Replies)
Discussion started by: saku
8 Replies
LEARN ABOUT OPENDARWIN
times
times(1) User Commands times(1)
NAME
times - shell built-in function to report time usages of the current shell
SYNOPSIS
sh
times
ksh
times
DESCRIPTION
sh
Print the accumulated user and system times for processes run from the shell.
ksh
Print the accumulated user and system times for the shell and for processes run from the shell.
On this man page, ksh(1) commands that are preceded by one or two * (asterisks) are treated specially in the following ways:
1. Variable assignment lists preceding the command remain in effect when the command completes.
2. I/O redirections are processed after variable assignments.
3. Errors cause a script that contains them to abort.
4. Words, following a command preceded by ** that are in the format of a variable assignment, are expanded with the same rules as a vari-
able assignment. This means that tilde substitution is performed after the = sign and word splitting and file name generation are not
performed.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO
ksh(1), sh(1), time(1), attributes(5)
SunOS 5.10 15 Apr 1994 times(1)