Skip to content

Commit 795e616

Browse files
Drop result kinds from experiment page
This is a pretty expensive query to compute, and while that could be optimized with some amount of indexing and creative SQL, it's not clear that this table delivers much value to the user. If we wanted to present partial reports, that could be done on a periodic basis (e.g., creating the index.html page every hour) and would seem largely more useful. In the meantime, it's better that the UI loads quickly than that we deliver this data.
1 parent 70962a0 commit 795e616

File tree

2 files changed

+0
-24
lines changed

2 files changed

+0
-24
lines changed

src/server/routes/ui/experiments.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
use crate::experiments::{Experiment, Mode, Status};
22
use crate::prelude::*;
3-
use crate::report::ResultName;
43
use crate::server::routes::ui::{render_template, LayoutContext};
54
use crate::server::{Data, HttpError};
65
use chrono::{Duration, SecondsFormat, Utc};
76
use http::Response;
87
use hyper::Body;
9-
use std::collections::HashMap;
108
use std::sync::Arc;
119

1210
#[derive(Serialize)]
@@ -121,7 +119,6 @@ struct ExperimentExt {
121119

122120
total_jobs: u32,
123121
completed_jobs: u32,
124-
result_counts: Vec<(String, u32)>,
125122
duration: Option<String>,
126123
estimated_end: Option<String>,
127124
average_job_duration: Option<String>,
@@ -147,14 +144,6 @@ fn humanize(duration: Duration) -> String {
147144
pub fn endpoint_experiment(name: String, data: Arc<Data>) -> Fallible<Response<Body>> {
148145
if let Some(ex) = Experiment::get(&data.db, &name)? {
149146
let (completed_jobs, total_jobs) = ex.raw_progress(&data.db)?;
150-
// this is done to avoid having tons of different test result types in the experiment page
151-
// all CompilerError and DependsOn failures are grouped together
152-
let mut result_counts = HashMap::new();
153-
for (res, count) in ex.get_result_counts(&data.db)? {
154-
*result_counts.entry(res.short_name()).or_default() += count;
155-
}
156-
let mut result_counts = result_counts.into_iter().collect::<Vec<_>>();
157-
result_counts.sort_by(|v1, v2| (v1.0).cmp(&v2.0));
158147

159148
let (duration, estimated_end, average_job_duration) =
160149
if completed_jobs > 0 && total_jobs > 0 {
@@ -198,7 +187,6 @@ pub fn endpoint_experiment(name: String, data: Arc<Data>) -> Fallible<Response<B
198187

199188
total_jobs,
200189
completed_jobs,
201-
result_counts,
202190
duration,
203191
estimated_end,
204192
average_job_duration,

templates/ui/experiment.html

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -106,18 +106,6 @@ <h1>Experiment <b>{{ experiment.name }}</b></h1>
106106
{% endif %}
107107
</table>
108108
</div>
109-
{% if experiment.result_counts | length > 0 %}
110-
<div class="card">
111-
<table class="details">
112-
{% for result_count in experiment.result_counts %}
113-
<tr>
114-
<th>{{ result_count.0 }} jobs:</th>
115-
<td>{{ result_count.1}}</td>
116-
</tr>
117-
{% endfor %}
118-
</table>
119-
</div>
120-
{% endif %}
121109
</div>
122110
</div>
123111
</div>

0 commit comments

Comments
 (0)