Skip to content

Commit

Permalink
feat: round output values
Browse files Browse the repository at this point in the history
  • Loading branch information
McPatate committed Nov 8, 2023
1 parent 23df655 commit 09184fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ jobs:
EOF
cat **/results.json | jq -r '"| \(.[0].repo_name) | \(.[0].source_type) | \(.[0].avg_hole_completion_time_ms) | \(.[0].pass_percentage)% |"' >> results.md
cat >> results.md <<EOF
**Note:** The "hole completion time" represents the full process of:
- copying files from the setup cache directory
- replacing the code from the file with a completion from the model
Expand Down
6 changes: 3 additions & 3 deletions crates/testbed/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -724,14 +724,14 @@ async fn main() -> anyhow::Result<()> {
let avg_hole_completion_time_ms = v.0 as f32 / v.2 / 1_000f32;
let pass_percentage = v.1 / v.2 * 100f32;
info!(
"{} from {} obtained {}% in {}s",
"{} from {} obtained {:.2}% in {:.3}s",
k.0, k.1, pass_percentage, avg_hole_completion_time_ms
);
serde_json::json!({
"repo_name": k.0,
"source_type": k.1,
"avg_hole_completion_time_ms": avg_hole_completion_time_ms,
"pass_percentage": pass_percentage,
"avg_hole_completion_time_ms": format!("{:.3}", avg_hole_completion_time_ms),
"pass_percentage": format!("{:.2}", pass_percentage),
})
})
.collect::<Vec<serde_json::Value>>();
Expand Down

0 comments on commit 09184fb

Please sign in to comment.