async function loadData()

in assets/android-metrics.js [335:359]


async function loadData(dataUrl) {
  try {
    // Fetch the gzipped file as a binary array buffer
    const response = await fetch(dataUrl);
    const compressedData = await response.arrayBuffer();

    // Decompress the data using pako
    const decompressedData = pako.inflate(new Uint8Array(compressedData), { to: 'string' });

    // Parse the decompressed string as JSON
    let data = JSON.parse(decompressedData).query_result.data.rows;

    fixupStartupTests(data);
    fixupPageloadTests(data);
    fixupResourceTests(data);

    window.data = data;
    window.data.sort((a, b) => new Date(a.date) - new Date(b.date));
    displayCharts();
    displayTable();

  } catch (error) {
    console.error('Error loading the JSON file:', error);
  }
}