equal
deleted
inserted
replaced
137 } |
137 } |
138 |
138 |
139 case class Result( |
139 case class Result( |
140 process_result: Process_Result, |
140 process_result: Process_Result, |
141 output_shasum: SHA1.Shasum, |
141 output_shasum: SHA1.Shasum, |
142 node_info: Build_Job.Node_Info, |
142 node_info: Host.Node_Info, |
143 current: Boolean |
143 current: Boolean |
144 ) { |
144 ) { |
145 def ok: Boolean = process_result.ok |
145 def ok: Boolean = process_result.ok |
146 } |
146 } |
147 |
147 |
186 |
186 |
187 def make_result( |
187 def make_result( |
188 name: String, |
188 name: String, |
189 process_result: Process_Result, |
189 process_result: Process_Result, |
190 output_shasum: SHA1.Shasum, |
190 output_shasum: SHA1.Shasum, |
191 node_info: Build_Job.Node_Info = Build_Job.Node_Info.none, |
191 node_info: Host.Node_Info = Host.Node_Info.none, |
192 current: Boolean = false |
192 current: Boolean = false |
193 ): State = { |
193 ): State = { |
194 val entry = name -> Build_Process.Result(process_result, output_shasum, node_info, current) |
194 val entry = name -> Build_Process.Result(process_result, output_shasum, node_info, current) |
195 copy(results = results + entry) |
195 copy(results = results + entry) |
196 } |
196 } |
345 List.from( |
345 List.from( |
346 stmt.execute_query().iterator { res => |
346 stmt.execute_query().iterator { res => |
347 val name = res.string(Running.name) |
347 val name = res.string(Running.name) |
348 val hostname = res.string(Running.hostname) |
348 val hostname = res.string(Running.hostname) |
349 val numa_node = res.get_int(Running.numa_node) |
349 val numa_node = res.get_int(Running.numa_node) |
350 Build_Job.Abstract(name, Build_Job.Node_Info(hostname, numa_node)) |
350 Build_Job.Abstract(name, Host.Node_Info(hostname, numa_node)) |
351 }) |
351 }) |
352 } |
352 } |
353 |
353 |
354 def update_running(db: SQL.Database, running: Map[String, Build_Job]): Boolean = { |
354 def update_running(db: SQL.Database, running: Map[String, Build_Job]): Boolean = { |
355 val old_running = read_running(db) |
355 val old_running = read_running(db) |
387 val out = res.string(Results.out) |
387 val out = res.string(Results.out) |
388 val err = res.string(Results.err) |
388 val err = res.string(Results.err) |
389 val timing_elapsed = res.long(Results.timing_elapsed) |
389 val timing_elapsed = res.long(Results.timing_elapsed) |
390 val timing_cpu = res.long(Results.timing_cpu) |
390 val timing_cpu = res.long(Results.timing_cpu) |
391 val timing_gc = res.long(Results.timing_gc) |
391 val timing_gc = res.long(Results.timing_gc) |
392 val node_info = Build_Job.Node_Info(hostname, numa_node) |
392 val node_info = Host.Node_Info(hostname, numa_node) |
393 val process_result = |
393 val process_result = |
394 Process_Result(rc, |
394 Process_Result(rc, |
395 out_lines = split_lines(out), |
395 out_lines = split_lines(out), |
396 err_lines = split_lines(err), |
396 err_lines = split_lines(err), |
397 timing = Timing(Time.ms(timing_elapsed), Time.ms(timing_cpu), Time.ms(timing_gc))) |
397 timing = Timing(Time.ms(timing_elapsed), Time.ms(timing_cpu), Time.ms(timing_gc))) |
597 progress.echo((if (store_heap) "Building " else "Running ") + session_name + " ...") |
597 progress.echo((if (store_heap) "Building " else "Running ") + session_name + " ...") |
598 |
598 |
599 store.init_output(session_name) |
599 store.init_output(session_name) |
600 |
600 |
601 val (numa_node, state1) = state.numa_next(build_context.numa_nodes) |
601 val (numa_node, state1) = state.numa_next(build_context.numa_nodes) |
602 val node_info = Build_Job.Node_Info(build_context.hostname, numa_node) |
602 val node_info = Host.Node_Info(build_context.hostname, numa_node) |
603 val job = |
603 val job = |
604 Build_Job.start_session( |
604 Build_Job.start_session( |
605 build_context, build_deps.background(session_name), input_shasum, node_info) |
605 build_context, build_deps.background(session_name), input_shasum, node_info) |
606 state1.add_running(session_name, job) |
606 state1.add_running(session_name, job) |
607 } |
607 } |