Archive for January, 2007

TTCP

The Story of the TTCP Program

nmap, ttcp, netstat, ipconfig all very useful. ping, too.

Yeah, so anyway, this ttcp thing; you set up transmitter and a receiver on the two machines you want to monitor. read about it here.

excerpt from that link:

Starting A PCATTCP Transmitter

To start the PCATTCP transmitter, go to the Command Prompt and then change to the folder containing the PCATTCP.EXE application. Enter the following command:

C:> pcattcp -t 172.16.1.10

The "-t" command-line option starts the PCATTCP program as a transmitter. You must enter the IP address of the platform hosting the PCATTCP receiver after the "-t" command-line parameter.

As soon as you start the PCATTCP transmitter, the test data transfer begins. After the transfer is complete, both the PCATTCP transmitter and receiver will display performance information and then exit. Here is an illustration of what would be displayed:

On The PCATTCP Receiver: C:> pcattcp -r PCAUSA Test TCP Utility V2.01.01.03 TCP Receive Test Local Host : twoeye400 ************** Listening...: On port 5001 Accept : TCP < - 192.168.1.105:1548 Buffer Size : 8192; Alignment: 16384/0 Receive Mode: Sinking (discarding) Data Statistics : TCP <- 192.168.1.105:1548 16777216 bytes in 33.77 real seconds = 485.22 KB/sec +++ numCalls: 2051; msec/call: 16.86; calls/sec: 60.74 On The PCATTCP Transmitter: C:> pcattcp -t 172.16.1.10 PCAUSA Test TCP Utility V2.01.01.03 TCP Transmit Test Transmit : TCP -> 192.168.1.101:5001 Buffer Size : 8192; Alignment: 16384/0 TCP_NODELAY : DISABLED (0) Connect : Connected to 192.168.1.101:5001 Send Mode : Send Pattern; Number of Buffers: 2048 Statistics : TCP -> 192.168.1.101:5001 16777216 bytes in 1.75 real seconds = 9362.29 KB/sec +++ numCalls: 2048; msec/call: 0.88; calls/sec: 1170.29

Comments

Basis Path, cyclometric complexity, and control flow graphs

Fascinating subject.

quoting from here:

“McCabe’s Basis Path Testing
Steps:
1: Draw a control flow graph
2: Calculate Cyclomatic complexity
3: Choose a “basis set” of paths
4: Generate test cases to exercise each path”

reading through, the basis set of paths, a little little like the critical path, is an important stage for testing your code:

“Choose a set of basis paths – Determining the predicate nodes can help
identify a set of basis paths. If test cases can be designed to cover the
basis path set, it will result in complete decision (and statement)
coverage of the code. Each basis path that you select must in effect test
at least one new untested edge, in other words it must traverse at least
one new edge. Otherwise it is considered a redundant path and does not
belong in the basis set. This aids in eliminating redundant testing and
ensures validity of each test case. For each subsequent basis path
selected try to keep the number of new edges added as low as possible –
progressing on until you have covered all possible basis paths.”

Hang on a min there – what is it exactly? Scrathcylde comes to the help:

if ( p1 ) a; else b; if ( p2 ) c; else d;

“Basis path testing only includes independent paths–each path must introduce an edge that has not been traversed previously.In our example a maximum of 3 tests will do this (number of conditions + 1).In fact could be covered by 2 tests e.g. ac and bd.”

Ah-ha.

Comments (2)

Predicate?

Whats a predicate? been stumped by this one, since it comes up now and then in my studies, e.g. predicate calculus, subject / predicate in sentences.

http://www.arts.uottawa.ca/writcent/hypergrammar/subjpred.html has an answer.

and answers have definitions:


http://www.answers.com/predicate&r=67
, namely:

“To make a statement or assertion.”

  1. Grammar. One of the two main constituents of a sentence or clause, modifying the subject and including the verb, objects, or phrases governed by the verb, as opened the door in Jane opened the door or is very sleepy in The child is very sleepy.

  2. Logic. That part of a proposition that is affirmed or denied about the subject. For example, in the proposition We are mortal, mortal is the predicate

So there we have it, the subject is modified by the predicate. Hey, perhaps the model is predicated by the artist.

its related to indicated and maybe dictated. But when would you use this word in everyday language? Here, coffee man, would it be possible to have my coffee predicated by some sugar? not likely. ever.

Now, in the sense of programming and testing, what are the predicates of some code?

from the glorious wikipedia:

“a predicate (computer programming) is an operator or function which returns a boolean value, true or false, and predication is a choice to execute or not to execute a given instruction based on the content of a machine register. ”

well well.

Comments

· Next entries »