<commit_before>#!/usr/bin/env python

import glob
import os
import sys

from lib.config import PLATFORM, get_target_arch
from lib.util import scoped_cwd, get_electron_version, make_zip, \
                     get_electron_branding, get_out_dir

ELECTRON_VERSION = get_electron_version()
PROJECT_NAME = get_electron_branding()['project_name']
OUT_DIR = get_out_dir()

def main():
  if get_target_arch() == 'mips64el':
    return

  dist_name = 'symbols.zip'
  zip_file = os.path.join(OUT_DIR, dist_name)
  licenses = ['LICENSE', 'LICENSES.chromium.html', 'version']

  with scoped_cwd(OUT_DIR):
    dirs = ['{0}.breakpad.syms'.format(PROJECT_NAME)]
    make_zip(zip_file, licenses, dirs)

  if PLATFORM == 'darwin':
    dsym_name = 'dsym.zip'
    with scoped_cwd(OUT_DIR):
      dsyms = glob.glob('*.dSYM')
      make_zip(os.path.join(OUT_DIR, dsym_name), licenses, dsyms)
  elif PLATFORM == 'win32':
    pdb_name = 'pdb.zip'
    with scoped_cwd(OUT_DIR):
      pdbs = glob.glob('*.pdb')
      make_zip(os.path.join(OUT_DIR, pdb_name), pdbs + licenses, [])

if __name__ == '__main__':<commit_msg>chore: add logging to zip-symbols.py to help debugging timeouts<commit_after>#!/usr/bin/env python

import glob
import os
import sys

from lib.config import PLATFORM, get_target_arch
from lib.util import scoped_cwd, get_electron_version, make_zip, \
                     get_electron_branding, get_out_dir

ELECTRON_VERSION = get_electron_version()
PROJECT_NAME = get_electron_branding()['project_name']
OUT_DIR = get_out_dir()

def main():
  print('Zipping Symbols')
  if get_target_arch() == 'mips64el':
    return

  dist_name = 'symbols.zip'
  zip_file = os.path.join(OUT_DIR, dist_name)
  licenses = ['LICENSE', 'LICENSES.chromium.html', 'version']

  with scoped_cwd(OUT_DIR):
    dirs = ['{0}.breakpad.syms'.format(PROJECT_NAME)]
    print('Making symbol zip: ' + zip_file)
    make_zip(zip_file, licenses, dirs)

  if PLATFORM == 'darwin':
    dsym_name = 'dsym.zip'
    with scoped_cwd(OUT_DIR):
      dsyms = glob.glob('*.dSYM')
      dsym_zip_file = os.path.join(OUT_DIR, dsym_name)
      print('Making dsym zip: ' + dsym_zip_file)
      make_zip(dsym_zip_file, licenses, dsyms)
  elif PLATFORM == 'win32':
    pdb_name = 'pdb.zip'
    with scoped_cwd(OUT_DIR):
      pdbs = glob.glob('*.pdb')
      pdb_zip_file = os.path.join(OUT_DIR, pdb_name)
      print('Making pdb zip: ' + pdb_zip_file)
      make_zip(pdb_zip_file, pdbs + licenses, [])

if __name__ == '__main__':
{'fraction_non_alphanumeric': 0.12959224868792896, 'fraction_numerical': 0.004037141703673799, 'mean_word_length': 4.006060606060606, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2319762', 'n_tokens_mistral': 970, 'n_tokens_neox': 943, 'n_words': 181}