llm: fix duration timer — start before subprocess, not after
This commit is contained in:
parent
a9b0438c74
commit
22e2bc73c8
1 changed files with 2 additions and 2 deletions
|
|
@ -59,6 +59,8 @@ fn call_model(agent: &str, model: &str, prompt: &str) -> Result<String, String>
|
||||||
cmd.env("CLAUDE_CONFIG_DIR", dir);
|
cmd.env("CLAUDE_CONFIG_DIR", dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let start = std::time::Instant::now();
|
||||||
|
|
||||||
let result = unsafe {
|
let result = unsafe {
|
||||||
cmd.pre_exec(|| {
|
cmd.pre_exec(|| {
|
||||||
libc::prctl(libc::PR_SET_PDEATHSIG, libc::SIGTERM);
|
libc::prctl(libc::PR_SET_PDEATHSIG, libc::SIGTERM);
|
||||||
|
|
@ -67,8 +69,6 @@ fn call_model(agent: &str, model: &str, prompt: &str) -> Result<String, String>
|
||||||
.output()
|
.output()
|
||||||
};
|
};
|
||||||
|
|
||||||
let start = std::time::Instant::now();
|
|
||||||
|
|
||||||
fs::remove_file(&tmp).ok();
|
fs::remove_file(&tmp).ok();
|
||||||
|
|
||||||
match result {
|
match result {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue