Skip to content

Commit

Permalink
tag1consulting#246: Make sure that HTML reports of every length get w…
Browse files Browse the repository at this point in the history
…ritten.
  • Loading branch information
slashrsm committed Nov 11, 2021
1 parent f54fc73 commit 9299454
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3063,7 +3063,7 @@ impl GooseAttack {
);

// Write the report to file.
if let Err(e) = report_file.write(report.as_ref()).await {
if let Err(e) = report_file.write_all(report.as_ref()).await {
return Err(GooseError::InvalidOption {
option: "--report-file".to_string(),
value: self.get_report_file_path().unwrap(),
Expand Down
6 changes: 3 additions & 3 deletions src/report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -410,11 +410,11 @@ pub fn graph_rps_template(rps: Vec<u32>) -> String {
format!(
r#"<div class="graph-rps">
<h2>Requests per second</h2>
<div id="main" style="width: 1000px; height:660px; background: white;"></div>
<div id="graph-rps" style="width: 1000px; height:660px; background: white;"></div>
<script src="https://cdn.jsdelivr.net/npm/echarts@5.2.2/dist/echarts.min.js"></script>
<script type="text/javascript">
var chartDom = document.getElementById('main');
var chartDom = document.getElementById('graph-rps');
var myChart = echarts.init(chartDom);
myChart.setOption({{
Expand All @@ -441,7 +441,7 @@ pub fn graph_rps_template(rps: Vec<u32>) -> String {
}});
</script>
</div>"#,
values = json!(rps.iter().enumerate().collect::<Vec<_>>()),
values = json!(rps.iter().enumerate().collect::<Vec<_>>())
)
}

Expand Down

0 comments on commit 9299454

Please sign in to comment.