Skip to content

Commit aedbd1b

Browse files
committed
Remove support for the old graph page
1 parent 6a3a3d4 commit aedbd1b

File tree

5 files changed

+8
-257
lines changed

5 files changed

+8
-257
lines changed

site/src/request_handlers.rs

Lines changed: 1 addition & 1 deletion
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,

site/src/request_handlers/graph.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ use crate::interpolate::Interpolated;
1212
use crate::load::SiteCtxt;
1313
use crate::selector::{self, PathComponent, Tag};
1414

15-
pub async fn handle_graph_new(
15+
pub async fn handle_graph(
1616
body: graph::Request,
1717
ctxt: &SiteCtxt,
1818
) -> ServerResult<graph::NewResponse> {
19-
log::info!("handle_graph_new({:?})", body);
19+
log::info!("handle_graph({:?})", body);
2020
let range = ctxt.data_range(body.start.clone()..=body.end.clone());
2121
let commits: Vec<ArtifactId> = range.iter().map(|c| c.clone().into()).collect();
2222

2323
let mut benchmarks = HashMap::new();
2424

25-
let raw = handle_graph(body, ctxt).await?;
25+
let raw = handle_graph_impl(body, ctxt).await?;
2626

2727
for (benchmark_, benchmark_data) in raw.benchmarks.iter() {
2828
let mut by_profile = HashMap::with_capacity(3);
@@ -66,11 +66,10 @@ pub async fn handle_graph_new(
6666

6767
static INTERPOLATED_COLOR: &str = "#fcb0f1";
6868

69-
pub async fn handle_graph(
69+
async fn handle_graph_impl(
7070
body: graph::Request,
7171
ctxt: &SiteCtxt,
7272
) -> ServerResult<Arc<graph::Response>> {
73-
log::info!("handle_graph({:?})", body);
7473
let is_default_query = body
7574
== graph::Request {
7675
start: Bound::None,

site/src/server.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -355,9 +355,6 @@ async fn serve_req(server: Server, req: Request) -> Result<Response, ServerError
355355
}
356356

357357
match path {
358-
"/perf/graph" => Ok(to_response(
359-
request_handlers::handle_graph(check!(parse_body(&body)), &ctxt).await,
360-
)),
361358
"/perf/get" => Ok(to_response(
362359
crate::comparison::handle_compare(check!(parse_body(&body)), &ctxt)
363360
.await
@@ -406,8 +403,8 @@ async fn serve_req(server: Server, req: Request) -> Result<Response, ServerError
406403
"/perf/self-profile-raw" => Ok(to_response(
407404
request_handlers::handle_self_profile_raw(check!(parse_body(&body)), &ctxt).await,
408405
)),
409-
"/perf/graph-new" => Ok(
410-
match request_handlers::handle_graph_new(check!(parse_body(&body)), &ctxt).await {
406+
"/perf/graph" => Ok(
407+
match request_handlers::handle_graph(check!(parse_body(&body)), &ctxt).await {
411408
Ok(result) => {
412409
let mut response = http::Response::builder()
413410
.header_typed(ContentType::json())

site/static/index-old.html

Lines changed: 0 additions & 245 deletions
This file was deleted.

site/static/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ <h3>This may take a while!</h3>
434434
stat: "instructions:u",
435435
kind: "raw",
436436
}, state);
437-
post_json("/graph-new", values).then(prepData).then(data =>
437+
post_json("/graph", values).then(prepData).then(data =>
438438
renderPlots(data, values));
439439
});
440440
</script>

0 commit comments

Comments
 (0)