91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 531KB
    文件類型: .bz2
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2021-05-22
  • 語言: 其他
  • 標(biāo)簽: FIO??

資源簡介

FIO是一個開源的I/O壓力測試工具,主要是用來測試磁盤/SSD的IO性能,也可測試cpu,nic的IO性能。它可以支持13種不同的I/O引擎,包括:sync, mmap, libaio, posixaio, SG v3, splice, network, syslet, guasi, solarisaio, I/O priorities (針對新的Linux內(nèi)核), rate I/O, forked or threaded jobs等。

資源截圖

代碼片段和文件信息

/*
?*?fio?-?the?flexible?io?tester
?*
?*?Copyright?(C)?2005?Jens?Axboe?
?*?Copyright?(C)?2006-2012?Jens?Axboe?
?*
?*?The?license?below?covers?all?files?distributed?with?fio?unless?otherwise
?*?noted?in?the?file?itself.
?*
?*??This?program?is?free?software;?you?can?redistribute?it?and/or?modify
?*??it?under?the?terms?of?the?GNU?General?Public?License?version?2?as
?*??published?by?the?Free?Software?Foundation.
?*
?*??This?program?is?distributed?in?the?hope?that?it?will?be?useful
?*??but?WITHOUT?ANY?WARRANTY;?without?even?the?implied?warranty?of
?*??MERCHANTABILITY?or?FITNESS?FOR?A?PARTICULAR?PURPOSE.??See?the
?*??GNU?General?Public?License?for?more?details.
?*
?*??You?should?have?received?a?copy?of?the?GNU?General?Public?License
?*??along?with?this?program;?if?not?write?to?the?Free?Software
?*??Foundation?Inc.?59?Temple?Place?Suite?330?Boston?MA??02111-1307??USA
?*
?*/
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?

#include?“fio.h“
#ifndef?FIO_NO_HAVE_SHM_H
#include?
#endif
#include?“hash.h“
#include?“smalloc.h“
#include?“verify.h“
#include?“trim.h“
#include?“diskutil.h“
#include?“cgroup.h“
#include?“profile.h“
#include?“l(fā)ib/rand.h“
#include?“l(fā)ib/memalign.h“
#include?“server.h“
#include?“l(fā)ib/getrusage.h“
#include?“idletime.h“
#include?“err.h“
#include?“workqueue.h“
#include?“l(fā)ib/mountcheck.h“
#include?“rate-submit.h“
#include?“helper_thread.h“

static?struct?fio_mutex?*startup_mutex;
static?struct?flist_head?*cgroup_list;
static?char?*cgroup_mnt;
static?int?exit_value;
static?volatile?int?fio_abort;
static?unsigned?int?nr_process?=?0;
static?unsigned?int?nr_thread?=?0;

struct?io_log?*agg_io_log[DDIR_RWDIR_CNT];

int?groupid?=?0;
unsigned?int?thread_number?=?0;
unsigned?int?stat_number?=?0;
int?shm_id?=?0;
int?temp_stall_ts;
unsigned?long?done_secs?=?0;

#define?PAGE_ALIGN(buf) \
(char?*)?(((uintptr_t)?(buf)?+?page_mask)?&?~page_mask)

#define?JOB_START_TIMEOUT (5?*?1000)

static?void?sig_int(int?sig)
{
if?(threads)?{
if?(is_backend)
fio_server_got_signal(sig);
else?{
log_info(“\nfio:?terminating?on?signal?%d\n“?sig);
log_info_flush();
exit_value?=?128;
}

fio_terminate_threads(TERMINATE_ALL);
}
}

void?sig_show_status(int?sig)
{
show_running_run_stats();
}

static?void?set_sig_handlers(void)
{
struct?sigaction?act;

memset(&act?0?sizeof(act));
act.sa_handler?=?sig_int;
act.sa_flags?=?SA_RESTART;
sigaction(SIGINT?&act?NULL);

memset(&act?0?sizeof(act));
act.sa_handler?=?sig_int;
act.sa_flags?=?SA_RESTART;
sigaction(SIGTERM?&act?NULL);

/*?Windows?uses?SIGBREAK?as?a?quit?signal?from?other?applications?*/
#ifdef?WIN32
memset(&act?0?sizeof(act));
act.sa_handler?=?sig_int;
act.sa_flags?=?SA_RESTART;
sigac

評論

共有 條評論