OpenMPI 0.1.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

Files | Typedefs | Functions
Stream Reader Interface

rstream provides an interface for dealing with a single stream of a trace. More...

## Files
file | OTF_RStream.h
| Provides read access to trace streams, which consist of multiple buffers.

## Typedefs
typedef struct struct_OTF_RStream | OTF_RStream
| rstream object

## Functions
OTF_RStream * | OTF_RStream_open (const char *nameStub, uint32_t id, OTF_FileManager *manager)
| Create a new OTF_RStream instance. More...
int | OTF_RStream_close (OTF_RStream *rstream)
| Close an OTF_RStream instance and all its related files. More...
OTF_RBuffer * | OTF_RStream_getDefBuffer (OTF_RStream *rstream)
| Returns the definition buffer of the according reader stream. More...
OTF_RBuffer * | OTF_RStream_setDefBuffer (OTF_RStream *rstream, OTF_RBuffer *rbuffer)
| Forces the given definition buffer to the according reader stream. More...
int | OTF_RStream_closeDefBuffer (OTF_RStream *rstream)
| Closes the stream definition buffer. More...
OTF_RBuffer * | OTF_RStream_getEventBuffer (OTF_RStream *rstream)
| Returns the event buffer of the according reader stream. More...
int | OTF_RStream_closeEventBuffer (OTF_RStream *rstream)
| Closes the stream event buffer. More...
OTF_RBuffer * | OTF_RStream_getSnapsBuffer (OTF_RStream *rstream)
| Returns the snapshots buffer of the according reader stream. More...
int | OTF_RStream_closeSnapsBuffer (OTF_RStream *rstream)
| Closes the stream snapshots buffer. More...
OTF_RBuffer * | OTF_RStream_getStatsBuffer (OTF_RStream *rstream)
| Returns the statistics buffer of the according reader stream. More...
int | OTF_RStream_closeStatsBuffer (OTF_RStream *rstream)
| Closes the stream statistics buffer. More...
OTF_RBuffer * | OTF_RStream_getMarkerBuffer (OTF_RStream *rstream)
| Returns the marker buffer of the according reader stream. More...
int | OTF_RStream_closeMarkerBuffer (OTF_RStream *rstream)
| Closes the stream marker buffer. More...
void | OTF_RStream_setBufferSizes (OTF_RStream *rstream, uint32_t size)
| Set the default buffer size for all buffers managed by this reader stream. More...
uint32_t | OTF_RStream_getBufferSizes (OTF_RStream *rstream)
| Get the default buffer size for all buffers managed by this reader stream. More...
void | OTF_RStream_setZBufferSizes (OTF_RStream *rstream, uint32_t size)
| Set the default zbuffer size for all files managed by this reader stream. More...
uint32_t | OTF_RStream_getZBufferSizes (OTF_RStream *rstream)
| Get the default zbuffer size for all files managed by this reader stream. More...
void | OTF_RStream_setRecordLimit (OTF_RStream *rstream, uint64_t limit)
| Sets the maximum number of records delivered by a single call to OTF_RStream_readXYZ(). More...
uint64_t | OTF_RStream_getRecordLimit (OTF_RStream *rstream)
| Returns the current record limit. More...
uint64_t | OTF_RStream_readDefinitions (OTF_RStream *rstream, OTF_HandlerArray *handlers)
| Reads all definitions from the stream. More...
uint64_t | OTF_RStream_readEvents (OTF_RStream *rstream, OTF_HandlerArray *handlers)
| Reads all events from the stream and calls the appropriated handler sorted by time. More...
uint64_t | OTF_RStream_readSnapshots (OTF_RStream *rstream, OTF_HandlerArray *handlers)
| Reads all snapshots from the stream. More...
uint64_t | OTF_RStream_readStatistics (OTF_RStream *rstream, OTF_HandlerArray *handlers)
| Reads all statistics from the stream. More...
uint64_t | OTF_RStream_readMarker (OTF_RStream *rstream, OTF_HandlerArray *handlers)
| Reads all markers from the stream. More...
uint8_t | OTF_RStream_eventProgress (OTF_RStream *rstream, uint64_t *minimum, uint64_t *current, uint64_t *maximum)
| depricated. More...
uint8_t | OTF_RStream_snapshotProgress (OTF_RStream *rstream, uint64_t *minimum, uint64_t *current, uint64_t *maximum)
| depricated. More...
uint8_t | OTF_RStream_statisticProgress (OTF_RStream *rstream, uint64_t *minimum, uint64_t *current, uint64_t *maximum)
| depricated. More...
uint8_t | OTF_RStream_eventTimeProgress (OTF_RStream *rstream, uint64_t *minimum, uint64_t *current, uint64_t *maximum)
| Delivers a progress report for reading events. More...
uint8_t | OTF_RStream_snapshotTimeProgress (OTF_RStream *rstream, uint64_t *minimum, uint64_t *current, uint64_t *maximum)
| Delivers a progress report for reading snapshots. More...
uint8_t | OTF_RStream_statisticTimeProgress (OTF_RStream *rstream, uint64_t *minimum, uint64_t *current, uint64_t *maximum)
| Delivers a progress report for reading statistics. More...
uint8_t | OTF_RStream_eventBytesProgress (OTF_RStream *rstream, uint64_t *minimum, uint64_t *current, uint64_t *maximum)
| Delivers a progress report for reading events. More...
uint8_t | OTF_RStream_snapshotBytesProgress (OTF_RStream *rstream, uint64_t *minimum, uint64_t *current, uint64_t *maximum)
| Delivers a progress report for reading snapshots. More...
uint8_t | OTF_RStream_statisticBytesProgress (OTF_RStream *rstream, uint64_t *minimum, uint64_t *current, uint64_t *maximum)
| Delivers a progress report for reading statistics. More...

## Detailed Description

rstream provides an interface for dealing with a single stream of a trace.

A stream consists of up to four different buffers (event buffer, definition buffer, snapshots buffer, statistics buffer).

rstream is structured similarly to the reader, but it is not able to perform jumps to random timestamps, and cannot quit at a certain maximum time stamp.

# A simple Example

Common includes

#include <stdio.h>
#include <assert.h>
#include "otf.h"

Define the Handler(s). We just want to process the def process event and print out all appearing processes.

int handleDefProcess (void *userData, uint32_t stream, uint32_t process, const char *name, uint32_t parent) {
printf( "process %u is named \"%s\"\n", process, name );
return OTF_RETURN_OK;
}
int main( int argc, char** argv ) {

    Declare a file manager, a reader, and a handler array

OTF_RStream* rstream;
OTF_FileManager* manager;
OTF_HandlerArray* handlers;

Initialize the file manager. Do not open more than 100 files.

manager= OTF_FileManager_open( 100 );
assert( manager );

Initialize the handler array.

handlers = OTF_HandlerArray_open();
assert( handlers );

Initialize the rstream object.

rstream = OTF_RStream_open( "mytrace", 0, manager );
assert( rstream );

Register your callback functions to the handler array.

OTF_HandlerArray_setHandler( handlers, (OTF_FunctionPointer*) handleDefProcess, OTF_DEFPROCESS_RECORD );

    Do the actual reading.

OTF_RStream_readDefinitions( rstream, handlers );

    Clean everything up before exiting the program.

OTF_RStream_close( rstream );
OTF_HandlerArray_close( handlers );
OTF_FileManager_close( manager );
return 0;
}

Compile and link this using $ gcc -o test test.c `otfconfig --libs`.

## Function Documentation

int OTF_RStream_close | ( | OTF_RStream * | rstream | ) |

Close an OTF_RStream instance and all its related files.

Parameters

  rstream | Pointer to an initialized OTF_RStream object. See also OTF_RStream_open().

Returns
  1 if instance was closed successfully and 0 otherwise.

Referenced by OTF_Reader_closeAllStreams().

int OTF_RStream_closeDefBuffer | ( | OTF_RStream * | rstream | ) |

Closes the stream definition buffer.

Parameters

  rstream | Pointer to an initialized OTF_RStream object. See also OTF_RStream_open().

Returns
  1 on success, 0 if an error occurs

References struct_OTF_RStream::defBuffer, and OTF_RBuffer_close().

int OTF_RStream_closeEventBuffer | ( | OTF_RStream * | rstream | ) |

Closes the stream event buffer.

Parameters

  rstream | Pointer to an initialized OTF_RStream object. See also OTF_RStream_open().

Returns
  1 on success, 0 if an error occurs

References struct_OTF_RStream::eventBuffer, and OTF_RBuffer_close().

int OTF_RStream_closeMarkerBuffer | ( | OTF_RStream * | rstream | ) |

Closes the stream marker buffer.

Parameters

  rstream | Pointer to an initialized OTF_RStream object. See also OTF_RStream_open().

Returns
  1 on success, 0 if an error occurs

References struct_OTF_RStream::markerBuffer, and OTF_RBuffer_close().

int OTF_RStream_closeSnapsBuffer | ( | OTF_RStream * | rstream | ) |

Closes the stream snapshots buffer.

Parameters

  rstream | Pointer to an initialized OTF_RStream object. See also OTF_RStream_open().

Returns
  1 on success, 0 if an error occurs

References OTF_RBuffer_close(), and struct_OTF_RStream::snapsBuffer.

int OTF_RStream_closeStatsBuffer | ( | OTF_RStream * | rstream | ) |

Closes the stream statistics buffer.

Parameters

  rstream | Pointer to an initialized OTF_RStream object. See also OTF_RStream_open().

Returns
  1 on success, 0 if an error occurs

References OTF_RBuffer_close(), and struct_OTF_RStream::statsBuffer.

uint8_t OTF_RStream_eventBytesProgress | ( | OTF_RStream * | rstream,
|  | uint64_t * | minimum,
|  | uint64_t * | current,
|  | uint64_t * | maximum
| ) |  |

Delivers a progress report for reading events.

Progress is given in terms of bytes. The percentage can be computed as ( current - minimum ) / ( maximum - minimum ).

ATTENTION: This in only a rough estimate of the progress, because it is computed based on the block I/O from files but not based on the actual bytes processed. This may result in constant values for small traces. See also OTF_RStream_eventTimeProgress():

The progress report is only valid after one or several calls to OTF_RStream_readEvents(). Otherwise the return arguments 'minimum', 'current' and 'maximum' are undefined! If 'minimum' > 'maximum' the values are invalid.

Parameters

  rstream | Pointer to an initialized OTF_RStream object. See also OTF_RStream_open().
  minimum | Return value for the minium bytes read ( is 0 everytime ).
  current | Return value for the current bytes read.
  maximum | Return value for the filesize.

Returns
  1 on success, 0 if an error occurs.

References struct_OTF_RStream::eventBuffer, OTF_RBuffer_getFilePos(), and OTF_RBuffer_getFileSize().

uint8_t OTF_RStream_eventProgress | ( | OTF_RStream * | rstream,
|  | uint64_t * | minimum,
|  | uint64_t * | current,
|  | uint64_t * | maximum
| ) |  |

depricated.

See also
  OTF_RStream_eventTimeProgress()

References OTF_RStream_eventTimeProgress().

uint8_t OTF_RStream_eventTimeProgress | ( | OTF_RStream * | rstream,
|  | uint64_t * | minimum,
|  | uint64_t * | current,
|  | uint64_t * | maximum
| ) |  |

Delivers a progress report for reading events.

It is given in terms of time stamps. A percentage can be computed as ( current - minimum ) / ( maximum - minimum ). This computation takes restricted time intervals into account which is not possible with OTF_RStream_eventBytesProgress().

The progress report is only valid after one or several calls to OTF_RStream_readEvents(). Otherwise the return arguments 'minimum', 'current' and 'maximum' are undefined! If 'minimum' > 'maximum' the values are invalid.

Parameters

  rstream | Pointer to an initialized OTF_RStream object. See also OTF_RStream_open().
  minimum | Return value for the minium time.
  current | Return value for the current time.
  maximum | Return value for the maximum time.

Returns
  1 on success, 0 if an error occurs.

References struct_OTF_RStream::eventBuffer, struct_OTF_RBuffer::firstTime, struct_OTF_RBuffer::lastTime, and struct_OTF_RBuffer::time.

Referenced by OTF_RStream_eventProgress().

uint32_t OTF_RStream_getBufferSizes | ( | OTF_RStream * | rstream | ) |

Get the default buffer size for all buffers managed by this reader stream.

Parameters

  rstream | Pointer to an initialized OTF_RStream object. See also OTF_RStream_open().

Returns
  Default buffer size for all buffers managed by this reader stream.

References struct_OTF_RStream::buffersizes.

OTF_RBuffer* OTF_RStream_getDefBuffer | ( | OTF_RStream * | rstream | ) |

Returns the definition buffer of the according reader stream.

Parameters

  rstream | Pointer to an initialized OTF_RStream object. See also OTF_RStream_open().

Returns
  Initialized OTF_RBuffer instance or 0 if an error occured.

References struct_OTF_RStream::buffersizes, struct_OTF_RStream::defBuffer, struct_OTF_RStream::id, struct_OTF_RStream::manager, struct_OTF_RStream::namestub, OTF_getFilename(), OTF_RBuffer_open(), OTF_RBuffer_setSize(), and OTF_RBuffer_setZBufferSize().

Referenced by OTF_RStream_readDefinitions().

OTF_RBuffer* OTF_RStream_getEventBuffer | ( | OTF_RStream * | rstream | ) |

Returns the event buffer of the according reader stream.

Parameters

  rstream | Pointer to an initialized OTF_RStream object. See also OTF_RStream_open().

Returns
  Initialized OTF_RBuffer instance or 0 if an error occured.

References struct_OTF_RStream::buffersizes, struct_OTF_RStream::eventBuffer, struct_OTF_RStream::id, struct_OTF_RStream::manager, struct_OTF_RStream::namestub, OTF_getFilename(), OTF_RBuffer_open(), OTF_RBuffer_setSize(), and OTF_RBuffer_setZBufferSize().

Referenced by OTF_RStream_readEvents().

OTF_RBuffer* OTF_RStream_getMarkerBuffer | ( | OTF_RStream * | rstream | ) |

Returns the marker buffer of the according reader stream.

Parameters

  rstream | Pointer to an initialized OTF_RStream object. See also OTF_RStream_open().

Returns
  Initialized OTF_RBuffer instance or 0 if an error occured.

References struct_OTF_RStream::buffersizes, struct_OTF_RStream::id, struct_OTF_RStream::manager, struct_OTF_RStream::markerBuffer, struct_OTF_RStream::namestub, OTF_getFilename(), OTF_RBuffer_open(), OTF_RBuffer_setSize(), and OTF_RBuffer_setZBufferSize().

Referenced by OTF_RStream_readMarker().

uint64_t OTF_RStream_getRecordLimit | ( | OTF_RStream * | rstream | ) |

Returns the current record limit.

Parameters

  rstream | Pointer to an initialized OTF_RStream object. See also OTF_RStream_open().

Returns
  Current record limit.

References struct_OTF_RStream::recordLimit.

OTF_RBuffer* OTF_RStream_getSnapsBuffer | ( | OTF_RStream * | rstream | ) |

Returns the snapshots buffer of the according reader stream.

Parameters

  rstream | Pointer to an initialized OTF_RStream object. See also OTF_RStream_open().

Returns
  Initialized OTF_RBuffer instance or 0 if an error occured.

References struct_OTF_RStream::buffersizes, struct_OTF_RStream::id, struct_OTF_RStream::manager, struct_OTF_RStream::namestub, OTF_getFilename(), OTF_RBuffer_open(), OTF_RBuffer_setSize(), OTF_RBuffer_setZBufferSize(), and struct_OTF_RStream::snapsBuffer.

Referenced by OTF_RStream_readSnapshots().

OTF_RBuffer* OTF_RStream_getStatsBuffer | ( | OTF_RStream * | rstream | ) |

Returns the statistics buffer of the according reader stream.

Parameters

  rstream | Pointer to an initialized OTF_RStream object. See also OTF_RStream_open().

Returns
  Initialized OTF_RBuffer instance or 0 if an error occured.

References struct_OTF_RStream::buffersizes, struct_OTF_RStream::id, struct_OTF_RStream::manager, struct_OTF_RStream::namestub, OTF_getFilename(), OTF_RBuffer_open(), OTF_RBuffer_setSize(), OTF_RBuffer_setZBufferSize(), and struct_OTF_RStream::statsBuffer.

Referenced by OTF_RStream_readStatistics().

uint32_t OTF_RStream_getZBufferSizes | ( | OTF_RStream * | rstream | ) |

Get the default zbuffer size for all files managed by this reader stream.

Parameters

  rstream | Pointer to an initialized OTF_RStream object. See also OTF_RStream_open().

Returns
  Default buffer size for all buffers managed by this reader stream.

OTF_RStream* OTF_RStream_open | ( | const char * | nameStub,
|  | uint32_t | id,
|  | OTF_FileManager * | manager
| ) |  |

Create a new OTF_RStream instance.

Parameters

  nameStub | File name prefix which is going to be used by all sub-files which belong to the reader stream.
  id | Abitrary but unique identifier of the reader stream. Must be > '0' for real streams. Use '0' for global definitions.
  manager | File handle manager.

Returns
  Initialized OTF_RStream instance or 0 if an error occurred.

References struct_OTF_RStream::id, struct_OTF_Reader::manager, struct_OTF_RStream::manager, and struct_OTF_RStream::namestub.

Referenced by OTF_Reader_getStream().

uint64_t OTF_RStream_readDefinitions | ( | OTF_RStream * | rstream,
|  | OTF_HandlerArray * | handlers
| ) |  |

Reads all definitions from the stream.

Parameters

  rstream | Pointer to an initialized OTF_RStream object. See also OTF_RStream_open().
  handlers | Pointer to the handler array.

Returns
  Number of records read or OTF_READ_MAXRECORDS

References struct_OTF_RBuffer::buffer, struct_OTF_RStream::defBuffer, struct_OTF_RStream::id, OTF_KeyValueList_reset(), OTF_RBuffer_getRecord(), OTF_Reader_parseDefRecord(), OTF_RStream_getDefBuffer(), struct_OTF_RBuffer::pos, and struct_OTF_RStream::recordLimit.

uint64_t OTF_RStream_readEvents | ( | OTF_RStream * | rstream,
|  | OTF_HandlerArray * | handlers
| ) |  |

Reads all events from the stream and calls the appropriated handler sorted by time.

Parameters

  rstream | Pointer to an initialized OTF_RStream object. See also OTF_RStream_open().
  handlers | Pointer to the handler array.

Returns
  Number of records read or OTF_READ_MAXRECORDS

References struct_OTF_RBuffer::buffer, struct_OTF_RStream::eventBuffer, OTF_KeyValueList_reset(), OTF_RBuffer_getRecord(), OTF_RBuffer_searchTime(), OTF_Reader_parseEventRecord(), OTF_RStream_getEventBuffer(), struct_OTF_RBuffer::pos, struct_OTF_RStream::recordLimit, and struct_OTF_RBuffer::time.

uint64_t OTF_RStream_readMarker | ( | OTF_RStream * | rstream,
|  | OTF_HandlerArray * | handlers
| ) |  |

Reads all markers from the stream.

Parameters

  rstream | Pointer to an initialized OTF_RStream object. See also OTF_RStream_open().
  handlers | Pointer to the handler array.

Returns
  Number of records read or OTF_READ_MAXRECORDS

References struct_OTF_RBuffer::buffer, struct_OTF_RStream::id, struct_OTF_RStream::markerBuffer, OTF_KeyValueList_reset(), OTF_RBuffer_getRecord(), OTF_Reader_parseMarkerRecord(), OTF_RStream_getMarkerBuffer(), struct_OTF_RBuffer::pos, and struct_OTF_RStream::recordLimit.

uint64_t OTF_RStream_readSnapshots | ( | OTF_RStream * | rstream,
|  | OTF_HandlerArray * | handlers
| ) |  |

Reads all snapshots from the stream.

Parameters

  rstream | Pointer to an initialized OTF_RStream object. See also OTF_RStream_open().
  handlers | Pointer to the handler array.

Returns
  Number of records read or OTF_READ_MAXRECORDS

References struct_OTF_RBuffer::buffer, OTF_KeyValueList_reset(), OTF_RBuffer_getRecord(), OTF_RBuffer_searchTime(), OTF_Reader_parseSnapshotsRecord(), OTF_RStream_getSnapsBuffer(), struct_OTF_RBuffer::pos, struct_OTF_RStream::recordLimit, struct_OTF_RStream::snapsBuffer, and struct_OTF_RBuffer::time.

uint64_t OTF_RStream_readStatistics | ( | OTF_RStream * | rstream,
|  | OTF_HandlerArray * | handlers
| ) |  |

Reads all statistics from the stream.

Parameters

  rstream | Pointer to an initialized OTF_RStream object. See also OTF_RStream_open().
  handlers | Pointer to the handler array.

Returns
  Number of records read or OTF_READ_MAXRECORDS

References struct_OTF_RBuffer::buffer, OTF_KeyValueList_reset(), OTF_RBuffer_getRecord(), OTF_RBuffer_searchTime(), OTF_Reader_parseStatisticsRecord(), OTF_RStream_getStatsBuffer(), struct_OTF_RBuffer::pos, struct_OTF_RStream::recordLimit, struct_OTF_RStream::statsBuffer, and struct_OTF_RBuffer::time.

void OTF_RStream_setBufferSizes | ( | OTF_RStream * | rstream,
|  | uint32_t | size
| ) |  |

Set the default buffer size for all buffers managed by this reader stream.

This is only effective for future buffers and will not change already allocated buffers. Those can be changed with the buffers directly.

Parameters

  rstream | Pointer to an initialized OTF_RStream object. See also OTF_RStream_open().
  size | Intended buffer size.

References struct_OTF_RStream::buffersizes.

Referenced by OTF_Reader_getStream().

OTF_RBuffer* OTF_RStream_setDefBuffer | ( | OTF_RStream * | rstream,
|  | OTF_RBuffer * | rbuffer
| ) |  |

Forces the given definition buffer to the according reader stream.

Parameters

  rstream | Pointer to an initialized OTF_RStream object. See also OTF_RStream_open().
  rbuffer | The OTF_RBuffer to use.

Returns
  The previously used Buffer or NULL if none.

References struct_OTF_RStream::buffersizes, struct_OTF_RStream::defBuffer, OTF_RBuffer_setSize(), and OTF_RBuffer_setZBufferSize().

void OTF_RStream_setRecordLimit | ( | OTF_RStream * | rstream,
|  | uint64_t | limit
| ) |  |

Sets the maximum number of records delivered by a single call to OTF_RStream_readXYZ().

Defaults to OTF_READ_MAXRECORDS == . 'OTF_Reader_readXYZ()' returns with the number of records processed. Successive calls to 'OTF_Reader_readXYZ()' will deliver the remaining records.

This function will NOT destroy a pending read operation, i.e. a read operation currently interrupted CAN be continued!

Parameters

  rstream | Pointer to an initialized OTF_RStream object. See also OTF_RStream_open().
  limit | new record limit. has to be smaller than or equal to OTF_READ_MAXRECORDS

References struct_OTF_RStream::recordLimit.

void OTF_RStream_setZBufferSizes | ( | OTF_RStream * | rstream,
|  | uint32_t | size
| ) |  |

Set the default zbuffer size for all files managed by this reader stream.

This is only effective for future files and will not change already allocated buffers. Those can be changed with the files directly.

Parameters

  rstream | Pointer to an initialized OTF_RStream object. See also OTF_RStream_open().
  size | Intended buffer size.

Referenced by OTF_Reader_getStream().

uint8_t OTF_RStream_snapshotBytesProgress | ( | OTF_RStream * | rstream,
|  | uint64_t * | minimum,
|  | uint64_t * | current,
|  | uint64_t * | maximum
| ) |  |

Delivers a progress report for reading snapshots.

Progress is given in terms of bytes. The percentage can be computed as ( current - minimum ) / ( maximum - minimum ).

ATTENTION: This in only a rough estimate of the progress, because it is computed based on the block I/O from files but not based on the actual bytes processed. This may result in constant values for small traces. See also OTF_RStream_snapshotTimeProgress():

The progress report is only valid after one or several calls to OTF_RStream_readSnapshots(). Otherwise the return arguments 'minimum', 'current' and 'maximum' are undefined! If 'minimum' > 'maximum' the values are invalid.

Parameters

  rstream | Pointer to an initialized OTF_RStream object. See also OTF_RStream_open().
  minimum | Return value for the minium bytes read ( is 0 everytime ).
  current | Return value for the current bytes read.
  maximum | Return value for the filesize.

Returns
  1 on success, 0 if an error occurs.

References OTF_RBuffer_getFilePos(), OTF_RBuffer_getFileSize(), and struct_OTF_RStream::snapsBuffer.

uint8_t OTF_RStream_snapshotProgress | ( | OTF_RStream * | rstream,
|  | uint64_t * | minimum,
|  | uint64_t * | current,
|  | uint64_t * | maximum
| ) |  |

depricated.

See also
  OTF_RStream_snapshotTimeProgress()

References OTF_RStream_snapshotTimeProgress().

uint8_t OTF_RStream_snapshotTimeProgress | ( | OTF_RStream * | rstream,
|  | uint64_t * | minimum,
|  | uint64_t * | current,
|  | uint64_t * | maximum
| ) |  |

Delivers a progress report for reading snapshots.

It is given in terms of time stamps. A percentage can be computed as ( current - minimum ) / ( maximum - minimum ). This computation takes restricted time intervals into account which is not possible with OTF_RStream_snapshotBytesProgress().

The progress report is only valid after one or several calls to OTF_RStream_readSnapshots(). Otherwise the return arguments 'minimum', 'current' and 'maximum' are undefined! If 'minimum' > 'maximum' the values are invalid.

Parameters

  rstream | Pointer to an initialized OTF_RStream object. See also OTF_RStream_open().
  minimum | Return value for the minium time.
  current | Return value for the current time.
  maximum | Return value for the maximum time.

Returns
  1 on success, 0 if an error occurs.

References struct_OTF_RBuffer::firstTime, struct_OTF_RBuffer::lastTime, struct_OTF_RStream::snapsBuffer, and struct_OTF_RBuffer::time.

Referenced by OTF_RStream_snapshotProgress().

uint8_t OTF_RStream_statisticBytesProgress | ( | OTF_RStream * | rstream,
|  | uint64_t * | minimum,
|  | uint64_t * | current,
|  | uint64_t * | maximum
| ) |  |

Delivers a progress report for reading statistics.

Progress is given in terms of bytes. The percentage can be computed as ( current - minimum ) / ( maximum - minimum ).

ATTENTION: This in only a rough estimate of the progress, because it is computed based on the block I/O from files but not based on the actual bytes processed. This may result in constant values for small traces. See also OTF_RStream_statisticTimeProgress():

The progress report is only valid after one or several calls to OTF_RStream_readStatistics(). Otherwise the return arguments 'minimum', 'current' and 'maximum' are undefined! If 'minimum' > 'maximum' the values are invalid.

Parameters

  rstream | Pointer to an initialized OTF_RStream object. See also OTF_RStream_open().
  minimum | Return value for the minium bytes read ( is 0 everytime ).
  current | Return value for the current bytes read.
  maximum | Return value for the filesize.

Returns
  1 on success, 0 if an error occurs.

References OTF_RBuffer_getFilePos(), OTF_RBuffer_getFileSize(), and struct_OTF_RStream::statsBuffer.

uint8_t OTF_RStream_statisticProgress | ( | OTF_RStream * | rstream,
|  | uint64_t * | minimum,
|  | uint64_t * | current,
|  | uint64_t * | maximum
| ) |  |

depricated.

See also
  OTF_RStream_statisticTimeProgress()

References OTF_RStream_statisticTimeProgress().

uint8_t OTF_RStream_statisticTimeProgress | ( | OTF_RStream * | rstream,
|  | uint64_t * | minimum,
|  | uint64_t * | current,
|  | uint64_t * | maximum
| ) |  |

Delivers a progress report for reading statistics.

It is given in terms of time stamps. A percentage can be computed as ( current - minimum ) / ( maximum - minimum ). This computation takes restricted time intervals into account which is not possible with OTF_Reader_statisticBytesProgress().

The progress report is only valid after one or several calls to OTF_Reader_readStatistics(). Otherwise the return arguments 'minimum', 'current' and 'maximum' are undefined! If 'minimum' > 'maximum' the values are invalid.

Parameters

  rstream | Pointer to an initialized OTF_RStream object. See also OTF_RStream_open().
  minimum | Return value for the minium time.
  current | Return value for the current time.
  maximum | Return value for the maximum time.

Returns
  1 on success, 0 if an error occurs.

References struct_OTF_RBuffer::firstTime, struct_OTF_RBuffer::lastTime, struct_OTF_RStream::statsBuffer, and struct_OTF_RBuffer::time.

Referenced by OTF_RStream_statisticProgress().