Perf09
Data Structures | Macros | Typedefs | Functions
perf09.c File Reference

Source code for the RDM Perf09 example. More...

#include <process.h>
#include <AclAPI.h>
#include <stdio.h>
#include "rdm.h"
#include "perf09_db.h"
#include "perf09_db_dbd.h"

Data Structures

struct  _PERF09_CTX

Macros

#define TRANS_BLOCK   1000
#define NUM_RECORDS   50000

Typedefs

typedef struct _PERF09_CTX PERF09_CTX

Functions

void display_elapsed_time (const char *msg, uint64_t start_time, uint64_t end_time)
 Display a message and the elapsed time to perform database operations.
int32_t initialize (PERF09_CTX *ctx)
 Initialize the RDM runtime library for use in the perf09 example.
void cleanup (PERF09_CTX *ctx)
 Cleanup the RDM runtime library.
int32_t main ()
 Main function for perf09 example.

Detailed Description

Source code for the RDM Perf09 example.


Macro Definition Documentation

#define NUM_RECORDS   50000

Number of records to initialize the database with

#define TRANS_BLOCK   1000

Number of updates in a transaction block


Typedef Documentation

typedef struct _PERF09_CTX PERF09_CTX

Context structure for the Perf09 example


Function Documentation

void cleanup ( PERF09_CTX ctx)

Cleanup the RDM runtime library.

This functions terminates the STANDALONE TFS used in the example.

Parameters:
[in]ctxPointer to the application context
void display_elapsed_time ( const char *  msg,
uint64_t  start_time,
uint64_t  end_time 
)

Display a message and the elapsed time to perform database operations.

Parameters:
[in]msgMessage to be display along with the elapsed time
[in]start_timeStart of elapsed time to display
[in]end_timeEnd of elapsed
int32_t initialize ( PERF09_CTX ctx)

Initialize the RDM runtime library for use in the perf09 example.

This function initializes the RDM Transactional File Server (TFS) to use the DIRECT-LINK TFS implementation. It also creates the database and initializes it with 50,000 records.

Returns:
Returns a 32-bit RDM return code (S_OKAY if successful)
Parameters:
[in,out]ctxPointer to the application context
int32_t main ( )

Main function for perf09 example.

The function initializes the RDM environment and runs the insert operations. over a number of transaction block sizes

Returns:
Returns 0 on success, and 1 if there were any errors