how to change optimization parameter
How to change the optimization parameters to other parameters other than time?
In gcc_minimal.py, I am changing the line
return Result(time=run_result['time']) to return Result(time=run_result['size])
but it is giving an error

You need to measure the size of the program, something like: Result(time=os.stat(output_dir).st_size)
There is also more complex objectives. See the petabricks example for ThresholdAccuracyMinimizeTime
Thank you so much for your response. I do not understand how to use complex objectives from petabricks example. Can you give me a simple example (as of gcc) such that I want the result of MinimumSizeMinimizeTime.
Multiple objectives allows you to do things like "find the fastest program under 1MB in size". You can define a custom objective to optimize the criteria you care about.
How to define a custom objective? What files need to be changed? Can you provide with a code example? Thanks.
I want to look for a gcc flags which has minimum size and best performance. How to define this objective and how to use this in code. Can u please provide me with a complete code?
i am sorry for interfering but i just saw a recent report with shared code mentioning gcc/clang flags tuning for minimum size and best performance: https://arxiv.org/abs/1801.08024 ; it is probably based on opentuner (I did not yet dig inside) - in such case you can probably find sample code there?
Examples of custom objectives are here: https://github.com/jansel/opentuner/blob/master/opentuner/search/objective.py#L212
That paper uses http://ctuning.org/