<commit_before>#!/usr/bin/env python
# Copyright (c) 2012 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.

"""Synchronize multiple files with a Google Storage Bucket and subdir.
For a lack of a better word 'synchronization' was used, warnings:
1) Downloads files that are not found locally
2) Uploads files that are not found in the bucket
3) Does NOT check version, date or content of the file. If the file is reported
   to be present both locally and in the bucket, no upload nor download is
   performed.
4) If we find filenames that do not match our expectations, an exception
   will be raised
"""

from slave import slave_utils
from utils import download_from_bucket
from utils import upload_to_bucket

import os
import posixpath
import re


DEFAULT_PERFDATA_GS_BASE = 'gs://chromium-skia-gm'
KNOWN_FILENAMES = r'^bench_r(\w*)_data.*'
IGNORE_UPLOAD_FILENAMES = ('.DS_Store')

<commit_msg>Fixes bench file upload regexp checking after switching to git commit hashes.<commit_after>#!/usr/bin/env python
# Copyright (c) 2012 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.

"""Synchronize multiple files with a Google Storage Bucket and subdir.
For a lack of a better word 'synchronization' was used, warnings:
1) Downloads files that are not found locally
2) Uploads files that are not found in the bucket
3) Does NOT check version, date or content of the file. If the file is reported
   to be present both locally and in the bucket, no upload nor download is
   performed.
4) If we find filenames that do not match our expectations, an exception
   will be raised
"""

from slave import slave_utils
from utils import download_from_bucket
from utils import upload_to_bucket

import os
import posixpath
import re


DEFAULT_PERFDATA_GS_BASE = 'gs://chromium-skia-gm'
KNOWN_FILENAMES = r'^bench_([0-9a-f]*)_data.*'
IGNORE_UPLOAD_FILENAMES = ('.DS_Store')


{'fraction_non_alphanumeric': 0.06137359961032635, 'fraction_numerical': 0.00876765708718948, 'mean_word_length': 4.521505376344086, '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': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1558078', 'n_tokens_mistral': 616, 'n_tokens_neox': 596, 'n_words': 291}