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


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

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


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

示例1: 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

示例2: main

int main(int argc, char* argv[])
{
	printf("Running sequential!!\n");
	char* results_file = "";
	if (argc == 1) {
		printf("Setting big SSD config\n");
		set_big_SSD();
	}
	else if (argc == 3) {
		char* config_file_name = argv[1];
		printf("Setting config from file:  %s\n", config_file_name);
		results_file = argv[2];
		printf("results_file:  %s\n", results_file);
		load_config(config_file_name);
	}

	string name = "/exp_sequential/";
	string exp_folder = get_current_dir_name() + name;
	Experiment::create_base_folder(exp_folder.c_str());

	//set_big_SSD();
	//OVER_PROVISIONING_FACTOR = 0.70;

	Workload_Definition* workload = new File_System_With_Noise();

	OS_SCHEDULER = 1;
	vector<vector<Experiment_Result> > exps;


	Experiment* e = new Experiment();
	e->set_io_limit(200000);
	//e->set_generate_trace_file(true);
	if (argc == 1) {
		BLOCK_MANAGER_ID = 0;
		string no_locality_calibration_file = "no_locality_calibration_file.txt";
		Experiment::calibrate_and_save(workload, no_locality_calibration_file, 4 * NUMBER_OF_ADDRESSABLE_PAGES());
		e->set_calibration_file(no_locality_calibration_file);
		e->run("no_locality");

		BLOCK_MANAGER_ID = 2;
		ENABLE_TAGGING = true;
		string locality_calibration_file = "locality_calibration_file.txt";
		Experiment::calibrate_and_save(workload, locality_calibration_file);
		e->set_calibration_file(locality_calibration_file);
		e->run("locality");
	}
	else if (argc == 3 && BLOCK_MANAGER_ID == 0) {
		printf("running no locality\n");
		string no_locality_calibration_file = "no_locality_calibration_file.txt";
		e->set_calibration_file(no_locality_calibration_file);
		e->set_alternate_location_for_results_file(results_file);
		e->run("no_locality");
	}
	else if (argc == 3 && BLOCK_MANAGER_ID == 2) {
		printf("running locality\n");
		string locality_calibration_file = "locality_calibration_file.txt";
		e->set_calibration_file(locality_calibration_file);
		e->set_alternate_location_for_results_file(results_file);
		e->run("locality");
	}
	e->draw_graphs();


	delete workload;
	delete e;
	//BLOCK_MANAGER_ID = 3;
	//ENABLE_TAGGING = true;
	//Experiment_Runner::calibrate_and_save(workload, true);
	//vector<Experiment_Result> er = Experiment::simple_experiment(workload, "sequential", IO_limit, OVER_PROVISIONING_FACTOR, space_min, space_max, space_inc);
	//exps.push_back(er);

	//exp.push_back( Experiment_Runner::overprovisioning_experiment(detection_LUN, 	space_min, space_max, space_inc, exp_folder + "seq_detect_lun/",	"Seq Detect: LUN", IO_limit) );
	//exp.push_back( Experiment_Runner::simple_experiment(experiment, Init_Workload, space_min, space_max, space_inc, exp_folder + "oracle/",			"Oracle", IO_limit) );
	//exp.push_back( Experiment_Runner::overprovisioning_experiment(shortest_queues,	space_min, space_max, space_inc, exp_folder + "shortest_queues/",	"Shortest Queues", IO_limit) );

	/*Experiment_Runner::draw_graphs(exps, exp_folder);
	vector<int> num_write_thread_values_to_show;
	for (double i = space_min; i <= space_max; i += space_inc)
		num_write_thread_values_to_show.push_back(i); // Show all used spaces values in multi-graphs

	Experiment_Runner::draw_experiment_spesific_graphs(exps, exp_folder, num_write_thread_values_to_show);
	chdir(".."); // Leaving*/
	return 0;
}
开发者ID:nivdayan,项目名称:EagleTree,代码行数:84,代码来源:sequential.cpp


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