Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Unified Diff: tools/telemetry/count

Issue 1033053002: [telemetry] Refactoring script. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment fixup Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/telemetry/refactor » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/count
diff --git a/tools/telemetry/count b/tools/telemetry/count
deleted file mode 100755
index 01b50893767654694c737616189f09f869eef5d3..0000000000000000000000000000000000000000
--- a/tools/telemetry/count
+++ /dev/null
@@ -1,40 +0,0 @@
-#! /usr/bin/env python
-# Copyright 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import imp
-import inspect
-import os
-
-from telemetry.util import path
-
-
-def IncludeDir(dir_name):
- return (dir_name[0] != '.' and dir_name[0] != '_' and
- not dir_name.startswith('internal') and not dir_name == 'third_party')
-
-
-def IncludeFile(file_name):
- root, ext = os.path.splitext(file_name)
- return (file_name[0] != '.' and
- not root.endswith('_unittest') and ext == '.py')
-
-
-def ListFiles(directory):
- matching_files = []
- for root, dirs, files in os.walk(directory):
- dirs[:] = [dir_name for dir_name in dirs if IncludeDir(dir_name)]
- matching_files += [
- os.path.relpath(os.path.join(root, file_name), directory)
- for file_name in files if IncludeFile(file_name)]
- return sorted(matching_files)
-
-
-def main():
- modules = ListFiles(path.GetTelemetryDir())
- print len(modules)
-
-
-if __name__ == '__main__':
- main()
« no previous file with comments | « no previous file | tools/telemetry/refactor » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698