1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-26 17:19:06 -05:00

Add rustfmt to third_party.

This commit is contained in:
Ryan Dahl 2018-10-19 19:15:14 -04:00
parent 09e011b389
commit 00884d7164
5 changed files with 13 additions and 10 deletions

View file

@ -465,7 +465,7 @@ rust_crate("futures_cpupool") {
":futures",
":num_cpus",
]
args = [ "-Adeprecated" ] # futures::Run
args = [ "-Adeprecated" ] # futures::Run
}
rust_crate("indexmap") {

@ -1 +1 @@
Subproject commit bfdd8a7ce2d82a958b0672eed222c1e5f8f34aa9
Subproject commit 71587318f7faf4ac4df78b355f5aec579e0de6fc

View file

@ -3,7 +3,7 @@
from glob import glob
import os
from third_party import third_party_path, fix_symlinks, google_env, clang_format_path
from util import root_path, run, find_exts
from util import root_path, run, find_exts, platform
fix_symlinks()
@ -39,5 +39,7 @@ run(["node", prettier, "--write"] +
find_exts("website/", ".js", ".ts", ".md"))
# yapf: enable
# Requires rustfmt 0.8.2 (flags were different in previous versions)
run(["rustfmt", "--config-path", rustfmt_config] + find_exts("src/", ".rs"))
run([
"third_party/rustfmt/" + platform() +
"/rustfmt", "--config-path", rustfmt_config
] + find_exts("src/", ".rs"))

View file

@ -33,12 +33,9 @@ def run(server_cmd):
# Run deno echo server in the background.
server = subprocess.Popen(server_cmd)
time.sleep(5) # wait for server to wake up. TODO racy.
wrk_platform = {
"linux2": "linux",
"darwin": "mac",
}[sys.platform]
try:
cmd = "third_party/wrk/" + wrk_platform + "/wrk -d " + DURATION + " http://" + ADDR + "/"
cmd = "third_party/wrk/%s/wrk -d %s http://%s/" % (util.platform(),
DURATION, ADDR)
print cmd
output = subprocess.check_output(cmd, shell=True)
req_per_sec = util.parse_wrk_output(output)

View file

@ -332,3 +332,7 @@ def parse_wrk_output(output):
if req_per_sec is None:
req_per_sec = extract_number(r'Requests/sec:\s+(\d+)', line)
return req_per_sec
def platform():
return {"linux2": "linux", "darwin": "mac", "win32": "win"}[sys.platform]