#!/bin/bash

# Use this file to force re-ingest data that has arrived from Android.
#
# This script reuses the transmission logs, which records every file POST'd to
# https://android-metric-ingest.skia.org/upload, and uses those logs to simulate
# those files as if they were newly POST'd.

# Alter the date argument to the gsutil ls command to determine which part of
# the log to re-transmit.

gsutil ls "gs://skia-perf/android-master-ingest/tx_log/2021/01/27/**" | xargs -L 1 -P 10 -I {} sh -c "echo {}; gsutil cp {} - | curl --include  --data @- https://android-metric-ingest.skia.org/upload"
Add sample script for re-ingesting Android data.
[perf] Add sample script for re-ingesting Android data.

Change-Id: I4a813dd3fb4795fd1f1cd3b0743375e46276806b
Reviewed-on: https://skia-review.googlesource.com/c/buildbot/+/364468
Auto-Submit: Joe Gregorio <b9cf2471ff6d33504cafe8e6f356b732b2cadced@google.com>
Reviewed-by: Ravi Mistry <9fa2e7438b8cb730f96b74865492597170561628@google.com>
