google-cloud-profiler-v2 0.3.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 92a0d5cf51fcf308728b94cced0ea804e5715d4e5661530c90f0d17880f9a3ea
4
- data.tar.gz: d3a4320b3d7a6ff218b9d2fadf5358bfa4a1fdd158a4e4bf35909cd42f3f4692
3
+ metadata.gz: aa00cb0ecdd5ffff1b01fda61974173811b76db4dc549e5f09dea1aa9f2d439c
4
+ data.tar.gz: 13b07aa88e30f32ecdccf37569691392f295628cd72c00da312271491fe7da10
5
5
  SHA512:
6
- metadata.gz: ad6763481dffc7aa69117035e16a593f2e393589ca13ecc007537a1ab1d7b14e681cdb1d656f4547362fb19af7ea457fa2ce0b83ef5cb4faada2dacd08b0c727
7
- data.tar.gz: 5dca168afea8bd26c732d060601d4e9574cd579099d744a522e59131430c62ad7a2575e122cd6e01d019d4ff3e5a277e4fe95c001fd354b637366824e85e075d
6
+ metadata.gz: f4e1f9883a2822aecb9520af25d8dd415017be7086a88f834b86bc5cd52c50fc7d3197353db9c083809f28dd176e5758135071ef95cbaf8ac55d754c03867fd2
7
+ data.tar.gz: b8b4003e035e27a0f399a66339e0d9ed60ec23314bc6f02dfd36ed938ca0ae48cb85a4839666266c6a2209b08c7ba18f031dcc87021289c8fc8ba3692e56b844
data/AUTHENTICATION.md CHANGED
@@ -114,7 +114,7 @@ credentials are discovered.
114
114
  To configure your system for this, simply:
115
115
 
116
116
  1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
117
- 2. Authenticate using OAuth 2.0 `$ gcloud auth login`
117
+ 2. Authenticate using OAuth 2.0 `$ gcloud auth application-default login`
118
118
  3. Write code as if already authenticated.
119
119
 
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Ruby Client for the Cloud Profiler V2 API
2
2
 
3
- API Client library for the Cloud Profiler V2 API
3
+ Manages continuous profiling information.
4
4
 
5
5
  Cloud Profiler is a statistical, low-overhead profiler that continuously gathers CPU usage and memory-allocation information from your production applications. It attributes that information to the application's source code, helping you identify the parts of the application consuming the most resources, and otherwise illuminating the performance characteristics of the code.
6
6
 
@@ -46,8 +46,8 @@ for general usage information.
46
46
  ## Enabling Logging
47
47
 
48
48
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
49
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
50
- or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
49
+ The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
50
+ or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
51
51
  that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
52
52
  and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
53
53
 
@@ -35,6 +35,8 @@ module Google
35
35
  # * Profiles can be created in either online or offline mode, see below.
36
36
  #
37
37
  class Client
38
+ include Paths
39
+
38
40
  # @private
39
41
  attr_reader :profiler_service_stub
40
42
 
@@ -67,12 +69,12 @@ module Google
67
69
  end
68
70
  default_config = Client::Configuration.new parent_config
69
71
 
70
- default_config.timeout = 30.0
72
+ default_config.timeout = 60.0
71
73
  default_config.retry_policy = {
72
74
  initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
73
75
  }
74
76
 
75
- default_config.rpcs.create_profile.timeout = 3600.0
77
+ default_config.rpcs.create_profile.timeout = 3610.0
76
78
 
77
79
  default_config.rpcs.create_offline_profile.timeout = 30.0
78
80
 
@@ -370,7 +372,7 @@ module Google
370
372
  # the default parameter values, pass an empty Hash as a request object (see above).
371
373
  #
372
374
  # @param profile [::Google::Cloud::Profiler::V2::Profile, ::Hash]
373
- # Profile to update
375
+ # Profile to update.
374
376
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
375
377
  # Field mask used to specify the fields to be overwritten. Currently only
376
378
  # profile_bytes and labels fields are supported by UpdateProfile, so only
@@ -479,9 +481,9 @@ module Google
479
481
  # * (`String`) The path to a service account key file in JSON format
480
482
  # * (`Hash`) A service account key as a Hash
481
483
  # * (`Google::Auth::Credentials`) A googleauth credentials object
482
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
484
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
483
485
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
484
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
486
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
485
487
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
486
488
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
487
489
  # * (`nil`) indicating no credentials
@@ -0,0 +1,64 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module Profiler
23
+ module V2
24
+ module ProfilerService
25
+ # Path helper methods for the ProfilerService API.
26
+ module Paths
27
+ ##
28
+ # Create a fully-qualified Profile resource string.
29
+ #
30
+ # The resource will be in the following format:
31
+ #
32
+ # `projects/{project}/profiles/{profile}`
33
+ #
34
+ # @param project [String]
35
+ # @param profile [String]
36
+ #
37
+ # @return [::String]
38
+ def profile_path project:, profile:
39
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
40
+
41
+ "projects/#{project}/profiles/#{profile}"
42
+ end
43
+
44
+ ##
45
+ # Create a fully-qualified Project resource string.
46
+ #
47
+ # The resource will be in the following format:
48
+ #
49
+ # `projects/{project}`
50
+ #
51
+ # @param project [String]
52
+ #
53
+ # @return [::String]
54
+ def project_path project:
55
+ "projects/#{project}"
56
+ end
57
+
58
+ extend self
59
+ end
60
+ end
61
+ end
62
+ end
63
+ end
64
+ end