本文整理汇总了C++中Statistic::Start方法的典型用法代码示例。如果您正苦于以下问题:C++ Statistic::Start方法的具体用法?C++ Statistic::Start怎么用?C++ Statistic::Start使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Statistic
的用法示例。
在下文中一共展示了Statistic::Start方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ext_ph
logical ClientObject :: Start ( )
{
int32 lindx0 = 0;
int32 *loid_array;
int32 count;
int32 err_count = 0;
Statistic stats;
ODABAClient client;
DBObjectHandle obhandle(utility_handle->sdbures->dbhandle);
logical term = NO;
BEGINSEQ
if ( !this ) ERROR
(*client_count)++;
stats.Start();
if ( !obhandle.IsServer() ) // client/server application
{
ds_handle = new DataSourceHandle();
ds_handle->SetDataSource(utility_handle->sdbures);
client.Open(NULL,"TestCS");
if ( ds_handle->Open(client) ) ERROR
obhandle = ds_handle->dbhandle;
}
PropertyHandle ext_ph(obhandle,extent,PI_Read); SDBCERR
PropertyHandle void_ph(obhandle,"VOID",PI_Read); SDBCERR
printf("\nThread %i started (%s)",id,extent);
if ( (count = ext_ph.GetCount()) > 0 )
{
loid_array = new int32[count];
memset(loid_array,0,count*sizeof(int32));
while ( ext_ph.Get(lindx0) )
loid_array[lindx0++] = ext_ph.GetLOID();
lindx0 = 0;
while ( lindx0 < count )
if ( !void_ph.Get(loid_array[lindx0++]) )
err_count++;
delete loid_array;
}
stats.Stop();
printf("\nThread %i stopped (%s) normally. Errors: %i",id,extent,err_count);
printf("\n total time: %s",stats.GetTotalTime());
RECOVER
printf("\nThread %i terminated (%s) with error",id,extent);
term = YES;
ENDSEQ
if ( this )
{
obhandle.Close();
Close();
client.ShutDown();
(*client_count)--;
delete this;
}
return(term);
}