Logs that show size of upload

Is there a log somewhere that tells me how many bytes my upload of a new app contains? To be more specific, the build tool tells me the size of the image, but I have heard that only the delta is actually sent over the air for an update. Is there a way to see how many bytes of data are actually sent on an update? Thanks.

Hey, I actually put together a script for this, not too long ago:

release1 = <OLD_RELEASE_ID>
release2 = <NEW_RELEASE_ID>

sdk.pine.get({
    resource: 'release',
    options: {
        $filter: {
            id:{ $in: [ release1, release2 ]},
        },
        $orderby: 'id asc',
        $expand: {
            image__is_part_of__release: {
                $select: 'id',
                $expand: {
                    image: {
                        $select: [
                            'id'
                        ],
                        $expand: {
                            is_a_build_of__service: {
                                $select: 'service_name'
                            }
                        }
                    }
                }
            }
        }
    }
}).then(([r1, r2]) => {
    r1services = { }
    _.each(r1.image__is_part_of__release, (ipr) => {
        r1services[ ipr.image[0].is_a_build_of__service[0].service_name] = ipr.image[0].id;
    })
    r2services = { }
    _.each(r2.image__is_part_of__release, (ipr) => {
        r2services[ ipr.image[0].is_a_build_of__service[0].service_name] = ipr.image[0].id;
    })

    deltaSizes = { }
    return Promise.all(_.map(r1services, (id, name) => { 
        return sdk.pine.get({ resource: 'delta', options: { $filter: { originates_from__image: id, produces__image: r2services[name] }, $select: 'size' } }).then(([ img ]) => { if (img != null) { deltaSizes[name] = img.size } else { deltaSizes[name] = 0 }});
    })).then(() => console.log(deltaSizes))
})

Replace the releaseIds with the one currently running on a device, and the one you want to move to, and execute this in the developer console whilst on the dashboard (so that your permissions are automatically loaded).

Let me know if you need any further help!

Hi thanks for sharing the script. Sorry it took me so long to get around to trying it. I am not sure what you mean by “execute this in the developer console”. Could you further clarify? I am on a mac, I do have node installed. I use npm to install the balena cli. I have been using the cli to login, and also to git push balena to my devices. Thats about all I know about using the developer console. I copied your script into a local file and named it delta-size.js. I am not sure what to do from here. Can you show me a screen shot of how to execute from the command line? Thanks very much.

Hi @chetferry. You can run the above from the developer console of your browser. Just log in to the dashboard.balena-cloud.com with your account, then open the developer console. Some more info for doing that on: