/ concept-collection / benchcompress
concept-collection / benchcompress
cachebust
Jeremy Magland <jmagland@flatironinstitute.org> committed commit 47f255494115 parent 5f9683c Browse files
4 changed files+11−5
README.mdmodified+5−2View file
@@ -67,9 +67,10 @@ npm run dev
6767
6868 ### Code Formatting
6969
70-This project uses pre-commit hooks to automatically format code before each commit. The formatting includes:
70+This project uses pre-commit hooks to automatically check format code before each commit. The formatting includes:
7171 - Python code formatting using black
7272 - TypeScript/JavaScript code formatting using npm scripts
73+- C++ code formatting using clang-format
7374
7475 To set up the pre-commit hooks after cloning the repository:
7576
@@ -83,4 +84,6 @@ pip install pre-commit
8384 pre-commit install
8485 ```
8586
86-After this setup, code will be automatically formatted when you make a commit.
87+After this setup, code will be automatically checked for formatting when you make a commit.
88+
89+Running `./devel/format_code.sh` which will format all code in the repository.
web-ui/src/App.tsxmodified+2−1View file
@@ -22,8 +22,9 @@ function App() {
2222 try {
2323 setIsLoading(true);
2424 setError(null);
25+ const cacheBust = Math.random().toString(36).substring(2, 15);
2526 const response = await axios.get(
26- "https://tempory.net/f/memobin/benchcompress/global/results.json",
27+ `https://tempory.net/f/memobin/benchcompress/global/results.json?cachebust=${cacheBust}`,
2728 );
2829 setBenchmarkData(response.data);
2930 } catch (error) {
web-ui/src/pages/Home.tsxmodified+2−1View file
@@ -90,8 +90,9 @@ export default function Home() {
9090 useEffect(() => {
9191 const fetchStatus = async () => {
9292 try {
93+ const cacheBust = Math.random().toString(36).substring(2, 15);
9394 const response = await axios.get(
94- "https://tempory.net/f/memobin/benchmark_status/current.json",
95+ `https://tempory.net/f/memobin/benchmark_status/current.json?cachebust=${cacheBust}`,
9596 );
9697 setStatus(response.data);
9798 } catch (error) {
web-ui/src/pages/Monitor.tsxmodified+2−1View file
@@ -27,8 +27,9 @@ export default function Monitor() {
2727 const fetchStatus = async () => {
2828 setLoading(true);
2929 try {
30+ const cacheBust = Math.random().toString(36).substring(2, 15);
3031 const response = await axios.get(
31- "https://tempory.net/f/memobin/benchmark_status/current.json",
32+ `https://tempory.net/f/memobin/benchmark_status/current.json?cachebust=${cacheBust}`,
3233 );
3334 setStatus(response.data);
3435 setError(null);