/* * @brief ostat/fsstatat multiplexer * * ostatat mulitplexes ostat and fstatat. If we don't HAVE_ATFUNCS, dirfd is ignored. * * @param dirfd (r) Only used if HAVE_ATFUNCS, ignored else, -1 gives AT_FDCWD * @param path (r) pathname * @param st (rw) pointer to struct stat */ int ostatat(int dirfd, const char *path, struct stat *st, int options) { #ifdef HAVE_ATFUNCS if (dirfd == -1) dirfd = AT_FDCWD; return fstatat(dirfd, path, st, (options & O_NOFOLLOW) ? AT_SYMLINK_NOFOLLOW : 0); #else return ostat(path, st, options); #endif /* DEADC0DE */ return -1; }
int stat(const char *p, struct stat *buf) { int r; static int (*ostat) (const char *restrict, struct stat *restrict)= 0; DP; resolv((void **)&ostat, "stat" SUF); nested++; r = ostat(p, buf); if (!r && nested == 1) emit('q', p); nested--; DD; return r; }
//------------------------------------------------------------------------------ int CWinMaskCountsConverter::operator()() { CRef< CSeqMaskerOstat > ostat( 0 ); if( os == 0 ) { ostat = CSeqMaskerOstatFactory::create( oformat, ofname, true ); } else ostat = CSeqMaskerOstatFactory::create( oformat, *os, true ); Uint4 unit_size = istat->UnitSize(); _TRACE( "set unit size to " << unit_size ); ostat->setUnitSize( unit_size ); Uint8 num_units = (unit_size < 16) ? (1ULL<<(2*unit_size)) : 0x100000000ULL; LOG_POST( "converting counts..." ); for( Uint8 i = 0; i < num_units; ++i ) { Uint4 ri = CSeqMaskerUtil::reverse_complement( i, unit_size ); if( i <= ri ) { Uint4 count = istat->trueat( i ); if( count != 0 ) ostat->setUnitCount( i, count ); } } LOG_POST( "converting parameters..." ); ostat->setBlank(); ostat->setBlank(); Uint4 t_low = istat->get_min_count(); Uint4 t_extend = istat->get_textend(); Uint4 t_threshold = istat->get_threshold(); Uint4 t_high = istat->get_max_count(); ostat->setParam( "t_low ", t_low ); ostat->setParam( "t_extend ", t_extend ); ostat->setParam( "t_threshold", t_threshold ); ostat->setParam( "t_high ", t_high ); ostat->setBlank(); LOG_POST( "final processing..." ); ostat->finalize(); return 0; }
void do_10_pack () { int n; long start = get_msec_count (), duration; ta_enter (&ten_pack_ta); for (n = 0; n < 10; n++) { new_order (); #ifndef NO_ONLY payment (); #endif } #ifndef NO_ONLY ta_enter (&delivery_ta); if (strstr (dbms, "Virtuoso") || strstr (dbms, "SOAP")) { for (n = 1; n <= 10; n++) delivery_1 (local_w_id, n); } else { delivery_1 (local_w_id, 0); } ta_leave (&delivery_ta); slevel (); ostat (); #endif ta_leave (&ten_pack_ta); duration = get_msec_count () - start; #if defined(GUI) log (1, "-- %ld tpmC\n", 600000 / duration); #else printf ("-- %ld tpmC\n\n", 600000 / duration); fflush (stdout); #endif }