Package Ganga :: Package GPIDev :: Package Lib :: Package Job :: Module JobTime' :: Class JobTime :: Class _proxyClass
[hide private]
[frames] | no frames]

Class _proxyClass

source code

    object --+    
             |    
GPIProxyObject --+
                 |
                Lib.Job.JobTime'.JobTime._proxyClass

Job timestamp access.
       In development

       Changes in the status of a Job are timestamped - a datetime object
       is stored in the dictionary named 'timestamps', in Coordinated
       Universal Time(UTC). More information on datetime objects can be
       found at:

       http://docs.python.org/library/datetime.html

       Datetime objects can be subtracted to produce a 'timedelta' object.
       More information about these can be found at the above address.
       '+', '*', and '/' are not supported by datetime objects.

       Datetime objects can be formatted into strings using the
       .strftime(format_string) application, and the strftime codes.
       e.g. %Y -> year as integer
            %a -> abbreviated weekday name
            %M -> minutes as inetger

       The full list can be found at:
       http://docs.python.org/library/datetime.html#strftime-behavior

       Standard status types with built in access methods are:
       -'new'
       -'submitted'
       -'running'
       -'completed'
       -'killed'
       -'failed'

       These return a string with default format %Y/%m/%d @ %H:%M:%S. A
       custom format can be specified in the arguement.

       Any information stored within the timestamps dictionary can also be
       extracted in the way as in would be for a standard, non-application
       specific python dictionary.

       For a table display of the Job's timestamps use .time.display(). For
       timestamps details from the backend use .time.details()
       
       
    

Properties:

     timestamps Dictionary containing timestamps for job. (simple property,
                default={},comparable)

Nested Classes [hide private]
  _impl
This is a Ganga.GPI.JobTime implementation class.
Instance Methods [hide private]
 
__eq__(self, x)
Equality operator (==), compare the JobTime properties which are declared as [comparable].
source code
 
__init__(self, *args, **kwds)
GPI JobTime object constructor: JobTime() : create jobtime with default settings; JobTime(j) : make a copy of j; JobTime(j,x=a,...): make a copy of j and set property 'x' to a, etc..
source code
 
__ne__(self, x)
Non-equality operator (!=).
source code
 
__repr__(self)
Return an short representation of JobTime object.
source code
 
__setattr__(self, x, v)
Set a property of JobTime with consistency and safety checks.
source code
 
__str__(self)
Return a printable string representing JobTime object as a tree of properties.
source code
 
backend_final(...)
Method for obtaining 'backend_final' timestamp.
source code
 
backend_running(...)
Method for obtaining 'backend_running' timestamp.
source code
 
completing(...)
Method for obtaining 'completing' timestamp.
source code
 
copy(self)
Make an identical copy of self.
source code
 
details(...)
Obtains all timestamps available from the job's specific backend.
source code
 
display(...)
Displays existing timestamps in a table.
source code
 
final(...)
Method for obtaining 'final' timestamp.
source code
 
new(...)
Method for obtaining 'new' timestamp.
source code
 
printdetails(...)
Prints backend details to screen by calling details() and printing the returned dictionary.
source code
 
runtime(...)
Method which returns the 'runtime' of the specified job.
source code
 
submissiontime(...)
Method which returns submission time of specified job.
source code
 
submitted(...)
Method for obtaining 'submitted' timestamp.
source code
 
submitting(...)
Method for obtaining 'submitting' timestamp.
source code
 
waittime(...)
Method which returns the waiting time of the specified job.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __sizeof__, __subclasshook__

Class Variables [hide private]
  timestamps = <Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor obje...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, *args, **kwds)
(Constructor)

source code 

GPI JobTime object constructor: JobTime() : create jobtime with default settings; JobTime(j) : make a copy of j; JobTime(j,x=a,...): make a copy of j and set property 'x' to a, etc..

Overrides: object.__init__

__repr__(self)
(Representation operator)

source code 

Return an short representation of JobTime object.

Overrides: object.__repr__

__setattr__(self, x, v)

source code 

Set a property of JobTime with consistency and safety checks. Setting a [protected] or a unexisting property raises AttributeError.

Overrides: object.__setattr__

__str__(self)
(Informal representation operator)

source code 

Return a printable string representing JobTime object as a tree of properties.

Overrides: object.__str__

details(...)

source code 
Obtains all timestamps available from the job's specific backend.

Subjob arguement: None  = default
                  'all' = gets details for ALL SUBJOBS. You have been warned.
                  int   = gets details for subjob number 'int'

No argument is required for a job with no subjobs.    

display(...)

source code 

Displays existing timestamps in a table.

Format can be specified by typing a string of the appropriate strftime() behaviour codes as the arguement. e.g. '%H:%M:%S' ==> 13:55:01

For a full list of codes see http://docs.python.org/library/datetime.html?#strftime-behavior

runtime(...)

source code 

Method which returns the 'runtime' of the specified job.

The runtime is calculated as the duration between the job entering the 'running' state and the job entering the 'completed' state.

submissiontime(...)

source code 

Method which returns submission time of specified job.

Calculation: sub_time = submitted - submitting.

waittime(...)

source code 

Method which returns the waiting time of the specified job.

The waiting time is calculated as the duration between the job entering the 'submitted' state and entering the 'running' state.


Class Variable Details [hide private]

timestamps

Value:
<Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x189d890>