Add .clang-format files and format more files

The .clang-format files tell clang-format to ignore certain directories
(replacing code in lint_clang_format.sh which will be removed).

$ git ls-tree -r master --name-only | grep '\.\(c\|h\|cpp\|gn\|gni\|mm\|m\|py\)$' | xargs ./append-space-to-files
$ git checkout -- generator/templates third_party/khronos/{KHR,vulkan}
$ git cl format --full --python

Followed by manual reformatting of a few things in Python for
readability.

Bug: none
Change-Id: I4c9e472cc9a5cd80c07286e808f4e597cfef5428
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/24785
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
diff --git a/scripts/perf_test_runner.py b/scripts/perf_test_runner.py
index c4cc55c..157d449 100755
--- a/scripts/perf_test_runner.py
+++ b/scripts/perf_test_runner.py
@@ -22,7 +22,8 @@
 import os
 import re
 
-base_path = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..'))
+base_path = os.path.abspath(
+    os.path.join(os.path.dirname(os.path.abspath(__file__)), '..'))
 
 # Look for a [Rr]elease build.
 perftests_paths = glob.glob('out/*elease*')
@@ -35,6 +36,7 @@
 
 scores = []
 
+
 def mean(data):
     """Return the sample arithmetic mean of data."""
     n = len(data)
@@ -102,6 +104,7 @@
 print('Using test executable: ' + perftests_path)
 print('Test name: ' + test_name)
 
+
 def get_results(metric, extra_args=[]):
     process = subprocess.Popen(
         [perftests_path, '--gtest_filter=' + test_name] + extra_args,
@@ -139,11 +142,14 @@
 
         if (len(scores) > 1):
             sys.stdout.write(", mean: %.2f" % mean(scores))
-            sys.stdout.write(", variation: %.2f%%" % (coefficient_of_variation(scores) * 100.0))
+            sys.stdout.write(", variation: %.2f%%" %
+                             (coefficient_of_variation(scores) * 100.0))
 
         if (len(scores) > 7):
             truncation_n = len(scores) >> 3
-            sys.stdout.write(", truncated mean: %.2f" % truncated_mean(scores, truncation_n))
-            sys.stdout.write(", variation: %.2f%%" % (truncated_cov(scores, truncation_n) * 100.0))
+            sys.stdout.write(", truncated mean: %.2f" %
+                             truncated_mean(scores, truncation_n))
+            sys.stdout.write(", variation: %.2f%%" %
+                             (truncated_cov(scores, truncation_n) * 100.0))
 
         print("")