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);
|
||||
}
|
||||
|
||||
let start = std::time::Instant::now();
|
||||
|
||||
let result = unsafe {
|
||||
cmd.pre_exec(|| {
|
||||
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()
|
||||
};
|
||||
|
||||
let start = std::time::Instant::now();
|
||||
|
||||
fs::remove_file(&tmp).ok();
|
||||
|
||||
match result {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue