当前位置: 首页>>代码示例>>C++>>正文


C++ Experiment::set_workload方法代码示例

本文整理汇总了C++中Experiment::set_workload方法的典型用法代码示例。如果您正苦于以下问题:C++ Experiment::set_workload方法的具体用法?C++ Experiment::set_workload怎么用?C++ Experiment::set_workload使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Experiment的用法示例。


在下文中一共展示了Experiment::set_workload方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: main

int main()
{
	printf("Running EagleTree\n");
	set_small_SSD_config();
	string name  = "/demo_output/";
	Experiment::create_base_folder(name.c_str());
	Experiment* e = new Experiment();
	Workload_Definition* workload = new Example_Workload();
	e->set_workload(workload);
	e->set_io_limit(1000000);
	e->run("test");
	e->draw_graphs();
	delete workload;
	return 0;
}
开发者ID:Paik,项目名称:EagleTree,代码行数:15,代码来源:demo.cpp

示例2: main

int main()
{
	printf("Running EagleTree\n");
	set_small_SSD_config();
//	set_big_SSD_config();

	//gogo greedy
	// GARBAGE_COLLECTION_POLICY = 0;
	// string name  = "/greedy_demo_output/";

	// gogo LRU
	GARBAGE_COLLECTION_POLICY = 1;
	string name  = "/lru_demo_output/";

	//gogo dj
//		GARBAGE_COLLECTION_POLICY = 2;
//	string name  = "/demo_output_500/";


	FTL_DESIGN = 1;	// using DFTL
	SCHEDULING_SCHEME = 7;
	PRINT_LEVEL = 0;
	MAX_SSD_QUEUE_SIZE = 16;
	ftl_cache::CACHED_ENTRIES_THRESHOLD = pow(2,15);		// SRAM fitting 256 kb, or 2^25 entries,
	DFTL::ENTRIES_PER_TRANSLATION_PAGE = 128;

	Experiment::create_base_folder(name.c_str());
	Experiment* e = new Experiment();
	Workload_Definition* workload = new Example_Workload();
	e->set_workload(workload);
	printf("NUMBER_OF_ADDRESSABLE_PAGES: %d  %d\n", NUMBER_OF_ADDRESSABLE_PAGES(), (int)(NUMBER_OF_ADDRESSABLE_PAGES() * OVER_PROVISIONING_FACTOR));
	e->set_io_limit(3000000);
//	e->set_io_limit(30000000);
//	e->set_io_limit(pow(2,0));
	e->run("test");
	e->draw_graphs();
	delete workload;
	return 0;
}
开发者ID:simdj,项目名称:SuperEagleTree,代码行数:39,代码来源:greedy_demo.cpp

示例3: main

int main()
{
	printf("Running EagleTree\n");
	set_small_SSD_config();
	string name  = "/demo_output/";
	Experiment::create_base_folder(name.c_str());
	Workload_Definition* init = new Init_Workload();
	string calibration_file = "calib.txt";
	SCHEDULING_SCHEME = 1; // use the noop IO scheduler during calibration because it's fastest in terms of real execution time
	Experiment::calibrate_and_save(init, calibration_file);
	delete init;
	Experiment* e = new Experiment();
	e->set_calibration_file(calibration_file);
	Workload_Definition* workload = new Asynch_Random_Workload();
	e->set_workload(workload);
	e->set_io_limit(1000000);
	SCHEDULING_SCHEME = 0; // use a fifo IO scheduler during the actual experiment
	e->run("test");
	e->draw_graphs();
	delete workload;
	return 0;
}
开发者ID:Paik,项目名称:EagleTree,代码行数:22,代码来源:demo1.cpp


注:本文中的Experiment::set_workload方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。