summaryrefslogtreecommitdiff
path: root/tools/build_benchmark_jsons.py
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-11-05 15:53:21 +0100
committerGitHub <noreply@github.com>2020-11-05 15:53:21 +0100
commit791119d4af1066b20fa2b5bf8fc82d04d843d51d (patch)
tree94890756f4380fb2c1d8abd92af66128533a1535 /tools/build_benchmark_jsons.py
parente7cfd90b0f72874aa1535a382df32dce28bd587a (diff)
build: rewrite tools/ scripts to deno (#8247)
This commit rewrites scripts in "tools/" directory to use Deno instead of Python. In return it allows to remove huge number of Python packages in "third_party/".
Diffstat (limited to 'tools/build_benchmark_jsons.py')
-rwxr-xr-xtools/build_benchmark_jsons.py30
1 files changed, 0 insertions, 30 deletions
diff --git a/tools/build_benchmark_jsons.py b/tools/build_benchmark_jsons.py
deleted file mode 100755
index f9f86c754..000000000
--- a/tools/build_benchmark_jsons.py
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
-import os
-import json
-from util import build_path
-
-
-def read_json(filename):
- with open(filename) as json_file:
- return json.load(json_file)
-
-
-def write_json(filename, data):
- with open(filename, 'w') as outfile:
- json.dump(data, outfile)
-
-
-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:])