/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <stdio.h>
#include <stdlib.h>
#ifdef DEBUG
#include <time.h>
#endif
#include "isns_server.h"
#include "isns_cache.h"
#include "isns_obj.h"
#include "isns_log.h"
#ifndef TARGET_DATA_STORE
#endif
#include TARGET_src(TARGET_DATA_STORE)
#ifdef DEBUG
extern int verbose_tc;
#endif
int
)
{
return (TARGET_func(_init_data)());
}
int
void **p,
isns_obj_t **objp,
)
{
}
int
const isns_obj_t *obj
)
{
int status;
#ifdef DEBUG
time_t t;
clock_t c;
if (verbose_tc != 0) {
c = clock();
}
#endif
#ifdef DEBUG
if (verbose_tc != 0) {
c = clock() - c;
total_time += t;
total_clock += c;
printf("time %d clock %.4lf -adding one object\n",
t, c / (double)CLOCKS_PER_SEC);
}
#endif
return (status);
}
int
const isns_obj_t *obj
)
{
int status;
#ifdef DEBUG
time_t t;
clock_t c;
if (verbose_tc != 0) {
c = clock();
}
#endif
#ifdef DEBUG
if (verbose_tc != 0) {
c = clock() - c;
total_time += t;
total_clock += c;
printf("time %d clock %.4lf -updating one object\n",
t, c / (double)CLOCKS_PER_SEC);
}
#endif
return (status);
}
int
const isns_obj_t *obj
)
{
int status;
#ifdef DEBUG
time_t t;
clock_t c;
if (verbose_tc != 0) {
c = clock();
}
#endif
#ifdef DEBUG
if (verbose_tc != 0) {
c = clock() - c;
total_time += t;
total_clock += c;
printf("time %d clock %.4lf -deleting one object\n",
t, c / (double)CLOCKS_PER_SEC);
}
#endif
return (status);
}
int
const isns_obj_t *obj
)
{
int status;
#ifdef DEBUG
time_t t;
clock_t c;
if (verbose_tc != 0) {
c = clock();
}
#endif
#ifdef DEBUG
if (verbose_tc != 0) {
c = clock() - c;
total_time += t;
total_clock += c;
printf("time %d clock %.4lf -deleting one membership\n",
t, c / (double)CLOCKS_PER_SEC);
}
#endif
return (status);
}
int
)
{
int status;
#ifdef DEBUG
time_t t;
clock_t c;
if (verbose_tc != 0) {
c = clock();
}
#endif
#ifdef DEBUG
if (verbose_tc != 0) {
c = clock() - c;
total_time += t;
total_clock += c;
printf("time %d clock %.4lf -flushing the data\n",
t, c / (double)CLOCKS_PER_SEC);
printf("time %d clock %.4lf -total update\n",
total_time = 0;
total_clock = 0;
}
#endif
return (status);
}
int
)
{
int status;
#ifdef DEBUG
time_t t;
clock_t c;
if (verbose_tc != 0) {
c = clock();
}
#endif
#ifdef DEBUG
if (verbose_tc != 0) {
c = clock() - c;
total_time += t;
total_clock += c;
printf("time %d clock %.4lf -flushing the data\n",
t, c / (double)CLOCKS_PER_SEC);
printf("time %d clock %.4lf -total update\n",
total_time = 0;
total_clock = 0;
}
#endif
return (status);
}