Skip to content

Commit

Permalink
Undoing a few more ancillary changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dbutenhof committed Oct 7, 2024
1 parent a49fc65 commit 1d5783d
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 18 deletions.
11 changes: 11 additions & 0 deletions backend/app/services/crucible_readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ each with a specific document mapping. CDM index names include a "root" name

Crucible timestamps are integers in "millisecond-from-the-epoch" format.

The Crucible CDM hierarchy is roughly:

- RUN (an instrumented benchmark run)
- TAG (metadata)
- ITERATION (a benchmark interval)
- PARAM (execution parameters)
- SAMPLE
- PERIOD (time range where data is recorded)
- METRIC_DESC (description of a specific recorded metric)
- METRIC_DATA (a specific recorded data point)

<dl>
<dt>RUN</dt><dd>this contains the basic information about a performance run, including a
generated UUID, begin and end timestamps, a benchmark name, a user name and
Expand Down
1 change: 1 addition & 0 deletions backend/scripts/start-reload.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#!/usr/bin/bash

uvicorn --reload --host="0.0.0.0" --port=8000 --forwarded-allow-ips='*' --proxy-headers app.main:app
16 changes: 4 additions & 12 deletions frontend/src/actions/ilabActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ export const fetchPeriods = (uid) => async (dispatch) => {
});
}
} catch (error) {
console.error(error);
dispatch(showFailureToast(error?.response?.data?.detail));
console.error(`ERROR (${error?.response?.status}): ${JSON.stringify(error?.response?.data)}`);
dispatch(showFailureToast());
}
dispatch({ type: TYPES.COMPLETED });
};
Expand Down Expand Up @@ -144,16 +144,8 @@ export const fetchGraphData =
});
}
} catch (error) {
var detail = error?.response?.data?.detail;
var str;
if (typeof detail == "string") {
str = detail;
} else if (typeof detail == "object" && typeof detail?.message == "string") {
str = detail.message;
} else {
str = JSON.stringify(detail);
}
dispatch(showFailureToast(str));
console.error(`ERROR (${error?.response?.status}): ${JSON.stringify(error?.response?.data)}`);
dispatch(showFailureToast());
}
dispatch({ type: TYPES.GRAPH_COMPLETED });
};
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/actions/toastActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import * as TYPES from "./types";

import { uid } from "@/utils/helper";

export const showFailureToast = (message = null) => async (dispatch) => {
export const showFailureToast = () => async (dispatch) => {
const toast = {
variant: "danger",
title: "Something went wrong",
message: message ? message : "Please try again later",
message: "Please try again later",
};
dispatch(showToast(toast.variant, toast.title, toast.message));
};
Expand Down
5 changes: 2 additions & 3 deletions frontend/src/components/atoms/PlotGraph/index.jsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
import Plotly from "react-plotly.js";
import PropTypes from "prop-types";

const PlotGraph = (props) => {
return (
<Plotly
data={props?.data}
useResizeHandler={false}
layout={props?.layout}
// layout={{ responsive: false, autosize: false, width: 600, length: 600 }}
layout={{ responsive: false, autosize: false, width: 600, length: 600 }}
/>
);
};
export default PlotGraph;

PlotGraph.propTypes = {
data: PropTypes.arr,
layout: PropTypes.object,
};
1 change: 0 additions & 1 deletion frontend/src/components/templates/ILab/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ const ILab = () => {
if (isExpanding) {
dispatch(fetchPeriods(run.id));
dispatch(fetchMetricsInfo(run.id));
// dispatch(fetchGraphData(run.id, run?.primary_metrics[0]));
}
};

Expand Down

0 comments on commit 1d5783d

Please sign in to comment.