Commit b4f2a43e authored by Oskar Skog's avatar Oskar Skog

Measure init time versus mine density

parent e234c0e4
This diff is collapsed.
......@@ -215,6 +215,17 @@ def init_time(width, height, n_mines, runs=10):
sys.stderr.write('\n')
return times
def init_time_curve():
data = []
for i in range(121):
x = init_time(20, 20, i, 100)
data.append(x)
f = open('init-time.curve', 'w')
f.write(pprint.pformat(data))
f.close()
def run2(path):
f = open(path, 'w')
data = {
......
#!/usr/bin/python
{
'init-field': {
'procs': 1, # Default is to not overload.
'procs': 2, # Default is to not overload.
'filename': '/tmp/mines.{0}',
'sec-maxtime': 7200, # Crash if initialization takes more
'sec-maxtime': 3600, # Crash if initialization takes more
# than one and a half minute.
'sec-maxarea': 1000000, # Crash if a huge field is requested.
},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment