-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NIO CountBytes example #975
NIO CountBytes example #975
Conversation
Let me start with general comments:
This is not true. This error comes from the way you loop and compute long total = 0;
int readCalls = 0;
for (int read = 1; read > 0; ) {
readCalls ++;
read = chan.read(buf);
buf.flip();
total += read; // On the last call you read -1 and sum it to total size, thus the mismatch
} In general the for loop seems a bit strange to me, I would have used something like (not tested): while (chan.read(buf) > 0) {
readCalls++;
total += buf.position();
buf.flip();
}
readCalls++; // We must count the last call
What does this mean? Is it slower at reading the size metadata or at downloading the file? Can you share some numbers? |
@@ -0,0 +1,82 @@ | |||
package com.google.cloud.examples.nio; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Thank you! Indeed it's obvious now.
Downloading the file. Here's what I see:
We can see that gsutil takes 1/4th of the time. The way it prints it suggests that it did 4 parallel downloads (each of 1/4th the size). |
Added licence text, plus some esthetic changes.
/** | ||
* CountBytes will read through the whole file given as input. | ||
* | ||
* <p>It's meant for testing that NIO doesn't read too slowly. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Are we OK to merge? |
@jean-philippe-martin just merged. As usual: thanks! |
You are welcome! |
…googleapis#975) - [ ] Regenerate this pull request now. feat: add saved_query.proto to aiplatform v1 feat: add saved_query_id to InputDataConfig in aiplatform v1 training_pipeline.proto PiperOrigin-RevId: 456872211 Source-Link: googleapis/googleapis@88f3973 Source-Link: https://github.com/googleapis/googleapis-gen/commit/daf8d1cb20fadabdd8914581da1ceeef048a34f7 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZGFmOGQxY2IyMGZhZGFiZGQ4OTE0NTgxZGExY2VlZWYwNDhhMzRmNyJ9 feat: add ListSavedQueries rpc to aiplatform v1beta1 dataset_service.proto feat: add saved_query.proto to aiplatform v1beta1 feat: add saved_query_id to InputDataConfig in aiplatform v1beta1 training_pipeline.proto PiperOrigin-RevId: 456872207 Source-Link: googleapis/googleapis@aeb384a Source-Link: https://github.com/googleapis/googleapis-gen/commit/c5c8894abbfcd1f6b9d38d9e9fd70a18f15cf0cc Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzVjODg5NGFiYmZjZDFmNmI5ZDM4ZDllOWZkNzBhMThmMTVjZjBjYyJ9
🤖 I have created a release *beep* *boop* --- ## [3.0.0](googleapis/java-aiplatform@v2.9.8...v3.0.0) (2022-07-01) ### ⚠ BREAKING CHANGES * added packaging options for C#, Ruby, and PHP ### Features * add BatchImportModelEvaluationSlices API in aiplatform v1 model_service.proto ([googleapis#972](googleapis/java-aiplatform#972)) ([7f45b24](googleapis/java-aiplatform@7f45b24)) * add BatchImportModelEvaluationSlices API in aiplatform v1beta1 model_service.proto ([7f45b24](googleapis/java-aiplatform@7f45b24)) * add display_name and metadata to ModelEvaluation in aiplatform model_evaluation.proto ([a2a404f](googleapis/java-aiplatform@a2a404f)) * add ListSavedQueries rpc to aiplatform v1 dataset_service.proto ([googleapis#975](googleapis/java-aiplatform#975)) ([ab9ba69](googleapis/java-aiplatform@ab9ba69)) * add ListSavedQueries rpc to aiplatform v1beta1 dataset_service.proto ([ab9ba69](googleapis/java-aiplatform@ab9ba69)) * add model_monitoring_config to BatchPredictionJob in aiplatform v1beta1 batch_prediction_job.proto ([googleapis#892](googleapis/java-aiplatform#892)) ([a2a404f](googleapis/java-aiplatform@a2a404f)) * add model_version_id to BatchPredictionJob in aiplatform v1 batch_prediction_job.proto ([7f45b24](googleapis/java-aiplatform@7f45b24)) * add model_version_id to DeployedModel in aiplatform v1 endpoint.proto ([7f45b24](googleapis/java-aiplatform@7f45b24)) * add model_version_id to PredictResponse in aiplatform v1 prediction_service.proto ([7f45b24](googleapis/java-aiplatform@7f45b24)) * add saved_query_id to InputDataConfig in aiplatform v1 training_pipeline.proto ([ab9ba69](googleapis/java-aiplatform@ab9ba69)) * add saved_query_id to InputDataConfig in aiplatform v1beta1 training_pipeline.proto ([ab9ba69](googleapis/java-aiplatform@ab9ba69)) * add saved_query.proto to aiplatform v1 ([ab9ba69](googleapis/java-aiplatform@ab9ba69)) * add saved_query.proto to aiplatform v1beta1 ([ab9ba69](googleapis/java-aiplatform@ab9ba69)) * add template_metadata to PipelineJob in aiplatform v1beta1 pipeline_job.proto ([a2a404f](googleapis/java-aiplatform@a2a404f)) * **samples:** add create-featurestore sample ([googleapis#948](googleapis/java-aiplatform#948)) ([ffc4b87](googleapis/java-aiplatform@ffc4b87)) ### Bug Fixes * added packaging options for C#, Ruby, and PHP ([a2a404f](googleapis/java-aiplatform@a2a404f)) * update gapic-generator-java with mock service generation fixes ([googleapis#979](googleapis/java-aiplatform#979)) ([e5f3ca5](googleapis/java-aiplatform@e5f3ca5)) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v2.13.0 ([googleapis#973](googleapis/java-aiplatform#973)) ([56ad705](googleapis/java-aiplatform@56ad705)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
…975) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-core](https://github.com/googleapis/java-core) | `2.8.5` -> `2.8.7` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-core/2.8.7/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-core/2.8.7/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-core/2.8.7/compatibility-slim/2.8.5)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-core/2.8.7/confidence-slim/2.8.5)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>googleapis/java-core</summary> ### [`v2.8.7`](https://github.com/googleapis/java-core/blob/HEAD/CHANGELOG.md#​287-httpsgithubcomgoogleapisjava-corecomparev286v287-2022-08-03) [Compare Source](https://github.com/googleapis/java-core/compare/v2.8.6...v2.8.7) ##### Dependencies - update dependency com.google.auth:google-auth-library-bom to v1.9.0 ([#​894](https://github.com/googleapis/java-core/issues/894)) ([82aaa16](https://github.com/googleapis/java-core/commit/82aaa16cd9813984a0c92d944eb1ad956759a8e5)) - update dependency io.grpc:grpc-bom to v1.48.1 ([#​891](https://github.com/googleapis/java-core/issues/891)) ([0b0f9b8](https://github.com/googleapis/java-core/commit/0b0f9b89757b801e8334c764644d7b66032d36d1)) ### [`v2.8.6`](https://github.com/googleapis/java-core/blob/HEAD/CHANGELOG.md#​286-httpsgithubcomgoogleapisjava-corecomparev285v286-2022-08-02) [Compare Source](https://github.com/googleapis/java-core/compare/v2.8.5...v2.8.6) ##### Dependencies - update dependency com.google.api:gax-bom to v2.18.7 ([#​890](https://github.com/googleapis/java-core/issues/890)) ([c67bed5](https://github.com/googleapis/java-core/commit/c67bed5281b458e78780cdd918235b5d073917c7)) - update dependency com.google.code.gson:gson to v2.9.1 ([#​888](https://github.com/googleapis/java-core/issues/888)) ([7b799c6](https://github.com/googleapis/java-core/commit/7b799c66f4aaf057242e9a231b920e49a7c964e9)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dialogflow). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xNDEuMCIsInVwZGF0ZWRJblZlciI6IjMyLjE0MS4wIn0=-->
🤖 I have created a release *beep* *boop* --- ## [4.7.5](googleapis/java-dialogflow@v4.7.4...v4.7.5) (2022-08-03) ### Dependencies * update dependency com.google.cloud:google-cloud-core to v2.8.5 ([#972](googleapis/java-dialogflow#972)) ([640883a](googleapis/java-dialogflow@640883a)) * update dependency com.google.cloud:google-cloud-core to v2.8.7 ([#975](googleapis/java-dialogflow#975)) ([c035726](googleapis/java-dialogflow@c035726)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v3 ([#969](googleapis/java-dialogflow#969)) ([45de673](googleapis/java-dialogflow@45de673)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 468735472 Source-Link: googleapis/googleapis@cfa1b37 Source-Link: https://github.com/googleapis/googleapis-gen/commit/09b7666656510f5b00b893f003a0ba5766f9e250 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDliNzY2NjY1NjUxMGY1YjAwYjg5M2YwMDNhMGJhNTc2NmY5ZTI1MCJ9
…1.1 (#975) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://github.com/googleapis/java-cloud-bom)) | `26.1.0` -> `26.1.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.1/compatibility-slim/26.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.1/confidence-slim/26.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xODQuMiIsInVwZGF0ZWRJblZlciI6IjMyLjE4NC4yIn0=-->
* fix: update DeIdentificationTest * temp test * updating tests * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.1 (#975) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://github.com/googleapis/java-cloud-bom)) | `26.1.0` -> `26.1.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.1/compatibility-slim/26.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.1/confidence-slim/26.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xODQuMiIsInVwZGF0ZWRJblZlciI6IjMyLjE4NC4yIn0=--> * fix tests Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: WhiteSource Renovate <[email protected]>
…1575) (#975) Source-Link: googleapis/synthtool@2e9ac19 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:8175681a918181d306d9c370d3262f16b4c724cc73d74111b7d42fc985ca7f93
…1.3 (googleapis#975) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://github.com/googleapis/java-cloud-bom)) | `26.1.2` -> `26.1.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.3/compatibility-slim/26.1.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.3/confidence-slim/26.1.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-containeranalysis). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4yMTkuMSIsInVwZGF0ZWRJblZlciI6IjMyLjIxOS4xIn0=-->
…1.3 (googleapis#975) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://github.com/googleapis/java-cloud-bom)) | `26.1.2` -> `26.1.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.3/compatibility-slim/26.1.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.3/confidence-slim/26.1.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-speech). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4yMTkuMSIsInVwZGF0ZWRJblZlciI6IjMyLjIxOS4xIn0=-->
🤖 I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
🤖 I have created a release *beep* *boop* --- <details><summary>1.51.0</summary> ## [1.51.0](https://github.com/googleapis/google-cloud-java/compare/v1.50.0...v1.51.0) (2025-01-29) ### Features * [aiplatform] add Context Cache to v1 ([87de77d](https://github.com/googleapis/google-cloud-java/commit/87de77d00b5bb8bcea1046a412288386e65bba0d)) * [aiplatform] Add machine_spec, data_persistent_disk_spec, network_spec, euc_config, shielded_vm_config to `.google.cloud.aiplatform.v1beta1.NotebookRuntime` ([87de77d](https://github.com/googleapis/google-cloud-java/commit/87de77d00b5bb8bcea1046a412288386e65bba0d)) * [aiplatform] Add machine_spec, data_persistent_disk_spec, network_spec, euc_config, shielded_vm_config to message `.google.cloud.aiplatform.v1.NotebookRuntime` ([87de77d](https://github.com/googleapis/google-cloud-java/commit/87de77d00b5bb8bcea1046a412288386e65bba0d)) * [aiplatform] add optimized config in v1 API ([87de77d](https://github.com/googleapis/google-cloud-java/commit/87de77d00b5bb8bcea1046a412288386e65bba0d)) * [aiplatform] add per-modality token count break downs for GenAI APIs ([87de77d](https://github.com/googleapis/google-cloud-java/commit/87de77d00b5bb8bcea1046a412288386e65bba0d)) * [aiplatform] add per-modality token count break downs for GenAI APIs ([87de77d](https://github.com/googleapis/google-cloud-java/commit/87de77d00b5bb8bcea1046a412288386e65bba0d)) * [aiplatform] add retrieval_config to ToolConfig v1 ([87de77d](https://github.com/googleapis/google-cloud-java/commit/87de77d00b5bb8bcea1046a412288386e65bba0d)) * [aiplatform] add retrieval_config to ToolConfig v1beta1 ([87de77d](https://github.com/googleapis/google-cloud-java/commit/87de77d00b5bb8bcea1046a412288386e65bba0d)) * [aiplatform] Add speculative decoding spec to DeployedModel proto ([87de77d](https://github.com/googleapis/google-cloud-java/commit/87de77d00b5bb8bcea1046a412288386e65bba0d)) * [aiplatform] enable FeatureGroup IAM Methods in v1beta1 API version ([87de77d](https://github.com/googleapis/google-cloud-java/commit/87de77d00b5bb8bcea1046a412288386e65bba0d)) * [aiplatform] enable FeatureView Service Account in v1 API version ([87de77d](https://github.com/googleapis/google-cloud-java/commit/87de77d00b5bb8bcea1046a412288386e65bba0d)) * [aiplatform] enable UpdateFeatureMonitor in v1beta1 API version ([87de77d](https://github.com/googleapis/google-cloud-java/commit/87de77d00b5bb8bcea1046a412288386e65bba0d)) * [aiplatform] Expose code execution tool API to v1 ([87de77d](https://github.com/googleapis/google-cloud-java/commit/87de77d00b5bb8bcea1046a412288386e65bba0d)) * [aiplatform] Model Registry Checkpoint API ([87de77d](https://github.com/googleapis/google-cloud-java/commit/87de77d00b5bb8bcea1046a412288386e65bba0d)) * [aiplatform] Model Registry Checkpoint API ([87de77d](https://github.com/googleapis/google-cloud-java/commit/87de77d00b5bb8bcea1046a412288386e65bba0d)) * [aiplatform] Reasoning Engine v1 GAPIC release ([87de77d](https://github.com/googleapis/google-cloud-java/commit/87de77d00b5bb8bcea1046a412288386e65bba0d)) * [aiplatform] Remove autorater config related visibility v1beta1 ([87de77d](https://github.com/googleapis/google-cloud-java/commit/87de77d00b5bb8bcea1046a412288386e65bba0d)) * [backupdr] add InitializeServiceAPI ([87de77d](https://github.com/googleapis/google-cloud-java/commit/87de77d00b5bb8bcea1046a412288386e65bba0d)) * [chat] A new field `custom_emoji_metadata` is added to message `.google.chat.v1.Annotation` ([87de77d](https://github.com/googleapis/google-cloud-java/commit/87de77d00b5bb8bcea1046a412288386e65bba0d)) * [cloudbuild] Add option to enable structured logging ([87de77d](https://github.com/googleapis/google-cloud-java/commit/87de77d00b5bb8bcea1046a412288386e65bba0d)) * [cloudcontrolspartner] A new method `CreateCustomer` is added to service `CloudControlsPartnerCore` ([87de77d](https://github.com/googleapis/google-cloud-java/commit/87de77d00b5bb8bcea1046a412288386e65bba0d)) * [compute] Update Compute Engine API to revision 20250107 ([#975](https://github.com/googleapis/google-cloud-java/issues/975)) ([87de77d](https://github.com/googleapis/google-cloud-java/commit/87de77d00b5bb8bcea1046a412288386e65bba0d)) * [datastream] A new field `ssl_config` is added to message `.google.cloud.datastream.v1.PostgresqlProfile` ([87de77d](https://github.com/googleapis/google-cloud-java/commit/87de77d00b5bb8bcea1046a412288386e65bba0d)) * [maps-places] add more fuel type enum values ([87de77d](https://github.com/googleapis/google-cloud-java/commit/87de77d00b5bb8bcea1046a412288386e65bba0d)) * [meet] Add methods for [configuring meeting spaces and members](https://developers.google.com/meet/api/guides/beta/configuration-beta) ([87de77d](https://github.com/googleapis/google-cloud-java/commit/87de77d00b5bb8bcea1046a412288386e65bba0d)) * [monitoring] add active_only field to ListMetricDescriptorsRequest ([87de77d](https://github.com/googleapis/google-cloud-java/commit/87de77d00b5bb8bcea1046a412288386e65bba0d)) * [network-management] expose the new v1 vpcflowlogs api proto ([87de77d](https://github.com/googleapis/google-cloud-java/commit/87de77d00b5bb8bcea1046a412288386e65bba0d)) * [parametermanager] new module for parametermanager ([#11412](https://github.com/googleapis/google-cloud-java/issues/11412)) ([5e93c83](https://github.com/googleapis/google-cloud-java/commit/5e93c83739ba93cb6a9876ab66e10b34c15b5490)) * [redis-cluster] [Memorystore for Redis Cluster] Added support for maintenance window and rescheduling maintenance ([87de77d](https://github.com/googleapis/google-cloud-java/commit/87de77d00b5bb8bcea1046a412288386e65bba0d)) * [redis-cluster] [Memorystore for Redis Cluster] Added support for maintenance window and rescheduling maintenance ([87de77d](https://github.com/googleapis/google-cloud-java/commit/87de77d00b5bb8bcea1046a412288386e65bba0d)) * [tpu] Add UNKNOWN to TPU node state, This state will be used to prevent a node from being marked as READY during diagnose after it has failed repair ([87de77d](https://github.com/googleapis/google-cloud-java/commit/87de77d00b5bb8bcea1046a412288386e65bba0d)) * [tpu] Introduce PerformMaintenance API ([87de77d](https://github.com/googleapis/google-cloud-java/commit/87de77d00b5bb8bcea1046a412288386e65bba0d)) * [tpu] Promote network_configs field to v2 API ([87de77d](https://github.com/googleapis/google-cloud-java/commit/87de77d00b5bb8bcea1046a412288386e65bba0d)) ### Bug Fixes * [maps-places] add oauth scopes to Places proto ([a3b082e](https://github.com/googleapis/google-cloud-java/commit/a3b082eea5a4ddbb6b3717bf0b8d7c19cdd2fda5)) * **deps:** update dependency com.google.cloud:google-cloud-storage to v2.48.0 ([#11409](https://github.com/googleapis/google-cloud-java/issues/11409)) ([92c852e](https://github.com/googleapis/google-cloud-java/commit/92c852eab1f3fbc9a5f2a7a6a577a17b1494b334)) * **deps:** update the Java code generator (gapic-generator-java) to 2.52.0 ([87de77d](https://github.com/googleapis/google-cloud-java/commit/87de77d00b5bb8bcea1046a412288386e65bba0d)) * Re-generate SecretManager v1beta1 client library ([#11402](https://github.com/googleapis/google-cloud-java/issues/11402)) ([c6559f6](https://github.com/googleapis/google-cloud-java/commit/c6559f6cf6d62290d3639ee61e506102ac085cd6)) * update dependency com.google.cloud:sdk-platform-java-config to v3.42.0 ([#11410](https://github.com/googleapis/google-cloud-java/issues/11410)) ([34dfd0d](https://github.com/googleapis/google-cloud-java/commit/34dfd0dc9c5ca042aca0778e8d34b2ca072bfeb1)) ### Documentation * [analytics-admin] replace "GA4" with "Google Analytics" or "GA" in all comments ([a3b082e](https://github.com/googleapis/google-cloud-java/commit/a3b082eea5a4ddbb6b3717bf0b8d7c19cdd2fda5)) * [analytics-admin] replace "GA4" with "Google Analytics" or "GA" in all comments ([a3b082e](https://github.com/googleapis/google-cloud-java/commit/a3b082eea5a4ddbb6b3717bf0b8d7c19cdd2fda5)) * [container] broken (or ambiguous) markdown link ([87de77d](https://github.com/googleapis/google-cloud-java/commit/87de77d00b5bb8bcea1046a412288386e65bba0d)) * [gsuite-addons] Minor documentation edits ([87de77d](https://github.com/googleapis/google-cloud-java/commit/87de77d00b5bb8bcea1046a412288386e65bba0d)) * [maps-fleetengine-delivery] Refine Docs for Fleet Engine time related fields ([87de77d](https://github.com/googleapis/google-cloud-java/commit/87de77d00b5bb8bcea1046a412288386e65bba0d)) * [maps-places] mark Places API client libraries as BETA ([87de77d](https://github.com/googleapis/google-cloud-java/commit/87de77d00b5bb8bcea1046a412288386e65bba0d)) * [meet] improve docs for GetSpaceRequest, EndActiveConferenceRequest, ListConferenceRecordsRequest ([87de77d](https://github.com/googleapis/google-cloud-java/commit/87de77d00b5bb8bcea1046a412288386e65bba0d)) * [orchestration-airflow] A comment for method `ListWorkloads` in service `Environments` is changed ([87de77d](https://github.com/googleapis/google-cloud-java/commit/87de77d00b5bb8bcea1046a412288386e65bba0d)) * [scheduler] update comments ([87de77d](https://github.com/googleapis/google-cloud-java/commit/87de77d00b5bb8bcea1046a412288386e65bba0d)) * [secretmanager] fix link in Markdown comments ([87de77d](https://github.com/googleapis/google-cloud-java/commit/87de77d00b5bb8bcea1046a412288386e65bba0d)) * [secretmanager] updated comment for `customer_managed_encryption` in message `.google.cloud.secretmanager.v1.Secret` ([87de77d](https://github.com/googleapis/google-cloud-java/commit/87de77d00b5bb8bcea1046a412288386e65bba0d)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
A CountBytes examples that reads through the provided file (using NIO), counting the bytes.
It also reports elapsed time, allowing for a simple form of benchmarking.
Amusingly, it currently says that the file sizes are off by one: it sees one fewer bytes than Files.size() reports. This is also noticeably slower than gsutil (perhaps because it's single-threaded?).
Sample output: