Skip to content

Commit 6a3807c

Browse files
authored
Merge pull request #1042 from tgnottingham/remove-old-graph
Remove support for the old graph page and refactor graph handler
2 parents f68da5c + a991024 commit 6a3807c

File tree

6 files changed

+108
-491
lines changed

6 files changed

+108
-491
lines changed

site/src/api.rs

+1-20
Original file line numberDiff line numberDiff line change
@@ -65,25 +65,6 @@ pub mod graph {
6565
PercentRelative,
6666
}
6767

68-
#[derive(Debug, PartialEq, Clone, Serialize, Deserialize)]
69-
pub struct GraphData {
70-
pub commit: u16,
71-
pub absolute: f32,
72-
// Percent change from the first datapoint shown
73-
pub percent_first: f32,
74-
pub y: f32,
75-
pub x: u64,
76-
pub is_interpolated: bool,
77-
}
78-
79-
#[derive(Debug, PartialEq, Clone, Serialize)]
80-
pub struct Response {
81-
pub benchmarks: HashMap<String, HashMap<String, Vec<(String, Vec<GraphData>)>>>,
82-
pub max: HashMap<String, f32>,
83-
pub colors: Vec<String>,
84-
pub commits: Vec<String>,
85-
}
86-
8768
#[derive(Debug, PartialEq, Clone, Serialize)]
8869
pub struct Series {
8970
// y-values
@@ -93,7 +74,7 @@ pub mod graph {
9374
}
9475

9576
#[derive(Debug, PartialEq, Clone, Serialize)]
96-
pub struct NewResponse {
77+
pub struct Response {
9778
// (UTC timestamp in seconds, sha)
9879
pub commits: Vec<(i64, String)>,
9980
pub benchmarks: HashMap<String, HashMap<database::Profile, HashMap<String, Series>>>,

site/src/request_handlers.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ mod status_page;
99
pub use bootstrap::handle_bootstrap;
1010
pub use dashboard::handle_dashboard;
1111
pub use github::handle_github;
12-
pub use graph::{handle_graph, handle_graph_new};
12+
pub use graph::handle_graph;
1313
pub use next_commit::handle_next_commit;
1414
pub use self_profile::{
1515
handle_self_profile, handle_self_profile_processed_download, handle_self_profile_raw,

0 commit comments

Comments
 (0)