benchmark.q File Reference

Go to the source code of this file.

Functions

 benchmark ()
 The "Benchmark" code to run.
 echo (val)
 asDestination (host, port)
 asFile (filename)
 haveArgument (arg)
 rpcOnce (handle)
 createHandleOrDie (server, port)
 executeRemoteCalls ()

Variables

 iterations = 10000
 The number of iterations to execute by default.
 port = 5000
 The default port to use in the server process.
 argv = .z.x
 The command line arguments.
 argc = count .z.x
 The number of command line arguments.
 argvAsDictionary = .Q.opt .z.x

Function Documentation

asDestination ( host  ,
port   
)

A function to convert a hostname and port number into a destination that we can connect to using hopen.

Parameters:
host The hostname of the remote machine
port The remote port to connect to
Returns:
A symbolic descriptor for the remote host:port

Definition at line 39 of file benchmark.q.

References port.

asFile ( filename   ) 

A function to convert a filename into a file descriptor we can open using hopen.

Parameters:
filename The filename to make into a descriptor
Returns:
The symbolic file descriptor

Definition at line 48 of file benchmark.q.

benchmark (  ) 

The "Benchmark" code to run.

Definition at line 16 of file benchmark.q.

createHandleOrDie ( server  ,
port   
)

Try to connect to the remote server on the given port. If we fail, then complain and exit.

Parameters:
server The server to connect to
port The port on which to connect
Returns:
The open connection handle

Definition at line 106 of file benchmark.q.

echo ( val   ) 

A function to print to a value to stdout.

Parameters:
val The value to print

Definition at line 29 of file benchmark.q.

executeRemoteCalls (  ) 

A function to open a connection to the server and execute 'iterations' number of RPC calls to the server. Save the timing data in the log file if requested.

Definition at line 113 of file benchmark.q.

haveArgument ( arg   ) 

A function to check whether we were passed a certain command line argument

Parameters:
arg The symbolic form of a command line argument we are checking
Returns:
true if we were passed this argument, otherwise false

Definition at line 66 of file benchmark.q.

rpcOnce ( handle   ) 

Performs an RPC call to execute one call to the benchmark function.

Parameters:
handle an open handle to the remote server
Returns:
returns whatever the benchmark server returns

Definition at line 96 of file benchmark.q.


Variable Documentation

argc = count .z.x

The number of command line arguments.

Definition at line 56 of file benchmark.q.

argv = .z.x

The command line arguments.

Definition at line 53 of file benchmark.q.

argvAsDictionary = .Q.opt .z.x

The command line arguments as a dictionary. "-flag arg" is processed so `flag is a key and arg is the associated value.

Definition at line 60 of file benchmark.q.

iterations = 10000

The number of iterations to execute by default.

Definition at line 21 of file benchmark.q.

port = 5000

The default port to use in the server process.

Definition at line 24 of file benchmark.q.

Referenced by asDestination().

 All Classes Namespaces Files Functions Variables
Generated on Sun May 16 04:20:01 2010 for q/kdb+2 by  doxygen 1.6.3