http://effbot.org/zone/python-with-statement.htm
with open("foo.txt") as f: for line in f: print line # do sth else使用with来打开文件的好处是, 不用在调用f.close()
with open("foo.txt") as f: for line in f: print line # do sth else使用with来打开文件的好处是, 不用在调用f.close()
/* 初始化libevent系统. */ event_init(); /* 准备ev_foo这个事件, 这个事件监听my_fd这个file descriptor, 当my_fd上出现EV_READ这个事件时候, 触发on_foo这个函数 */ event_set(&ev_foo, my_fd, EV_READ|EV_PERSIST, on_foo, NULL); /* schedule这个事件 */ event_add(&ev_foo, NULL); /* 进入event循环. */ event_dispatch();
${YCSB_HOME}/bin/ycsb load basic -P ${YCSB_HOME}/workloads/workloada -P ./my-workloads-setting.dat生成exec phase的trace,正真用于测试的trace
${YCSB_HOME}/bin/ycsb run basic -P ${YCSB_HOME}/workloads/workloada -P ./my-workloads-setting.dat