0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-30 09:08:00 -04:00
denoland-deno/tools/build_benchmark_jsons.py
Ry Dahl 1d8f3cc896
Remove old website (#3194)
Move manual.md and style_guide.md into //std so they can be accessed
from https://deno.land/std/manual.md

Code for new website is https://github.com/denoland/deno_website2

Co-authored-by: Christian Moritz <chrmoritz@gmail.com>
2019-10-24 16:14:05 -04:00

19 lines
653 B
Python
Executable file

#!/usr/bin/env python
# Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
from util import build_path
from benchmark import read_json, write_json
import os
current_data_file = os.path.join(build_path(), "bench.json")
all_data_file = "gh-pages/data.json" # Includes all benchmark data.
recent_data_file = "gh-pages/recent.json" # Includes recent 20 benchmark data.
assert os.path.exists(current_data_file)
assert os.path.exists(all_data_file)
new_data = read_json(current_data_file)
all_data = read_json(all_data_file)
all_data.append(new_data)
write_json(all_data_file, all_data)
write_json(recent_data_file, all_data[-20:])