Duration of the profiling session.
Input (for the offline mode) or output (for the online mode).
The field represents requested profiling duration. It may slightly differ
from the effective profiling duration, which is recorded in the profile
data, in case the profiling can't be stopped immediately (e.g. in case
stopping the profiling is handled asynchronously).
Input only. Labels associated to this specific profile. These labels will
get merged with the deployment labels for the final data set. See
documentation on deployment labels for validation rules and limits.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eProfile\u003c/code\u003e class in the Google Cloud Profiler v2 API represents a profile resource, and it implements several interfaces including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the \u003ccode\u003eProfile\u003c/code\u003e class documentation is version 2.6.0, and previous versions are accessible, ranging back to version 1.0.0.\u003c/p\u003e\n"],["\u003cp\u003eKey properties of the \u003ccode\u003eProfile\u003c/code\u003e class include \u003ccode\u003eDeployment\u003c/code\u003e, \u003ccode\u003eDuration\u003c/code\u003e, \u003ccode\u003eLabels\u003c/code\u003e, \u003ccode\u003eName\u003c/code\u003e, \u003ccode\u003eProfileBytes\u003c/code\u003e, \u003ccode\u003eProfileName\u003c/code\u003e, \u003ccode\u003eProfileType\u003c/code\u003e, and \u003ccode\u003eStartTime\u003c/code\u003e, each serving a specific function in managing profile data.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eProfile\u003c/code\u003e class can be instantiated using the \u003ccode\u003eProfile()\u003c/code\u003e default constructor or the \u003ccode\u003eProfile(Profile other)\u003c/code\u003e constructor to create a copy of another Profile object.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eProfile\u003c/code\u003e resource provides methods for working with profile data, including an opaque server-assigned unique ID, and input/output fields for a variety of use cases such as online and offline modes.\u003c/p\u003e\n"]]],[],null,["# Cloud Profiler v2 API - Class Profile (2.6.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.6.0 (latest)](/dotnet/docs/reference/Google.Cloud.Profiler.V2/latest/Google.Cloud.Profiler.V2.Profile)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.Profiler.V2/2.5.0/Google.Cloud.Profiler.V2.Profile)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.Profiler.V2/2.4.0/Google.Cloud.Profiler.V2.Profile)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.Profiler.V2/2.3.0/Google.Cloud.Profiler.V2.Profile)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.Profiler.V2/2.2.0/Google.Cloud.Profiler.V2.Profile)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.Profiler.V2/2.1.0/Google.Cloud.Profiler.V2.Profile)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.Profiler.V2/2.0.0/Google.Cloud.Profiler.V2.Profile)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.Profiler.V2/1.2.0/Google.Cloud.Profiler.V2.Profile)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.Profiler.V2/1.1.0/Google.Cloud.Profiler.V2.Profile)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.Profiler.V2/1.0.0/Google.Cloud.Profiler.V2.Profile) \n\n public sealed class Profile : IMessage\u003cProfile\u003e, IEquatable\u003cProfile\u003e, IDeepCloneable\u003cProfile\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Cloud Profiler v2 API class Profile.\n\nProfile resource. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e Profile \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[Profile](/dotnet/docs/reference/Google.Cloud.Profiler.V2/latest/Google.Cloud.Profiler.V2.Profile), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Profile](/dotnet/docs/reference/Google.Cloud.Profiler.V2/latest/Google.Cloud.Profiler.V2.Profile), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[Profile](/dotnet/docs/reference/Google.Cloud.Profiler.V2/latest/Google.Cloud.Profiler.V2.Profile), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Profiler.V2](/dotnet/docs/reference/Google.Cloud.Profiler.V2/latest/Google.Cloud.Profiler.V2)\n\nAssembly\n--------\n\nGoogle.Cloud.Profiler.V2.dll\n\nConstructors\n------------\n\n### Profile()\n\n public Profile()\n\n### Profile(Profile)\n\n public Profile(Profile other)\n\nProperties\n----------\n\n### Deployment\n\n public Deployment Deployment { get; set; }\n\nDeployment this profile corresponds to.\n\n### Duration\n\n public Duration Duration { get; set; }\n\nDuration of the profiling session.\nInput (for the offline mode) or output (for the online mode).\nThe field represents requested profiling duration. It may slightly differ\nfrom the effective profiling duration, which is recorded in the profile\ndata, in case the profiling can't be stopped immediately (e.g. in case\nstopping the profiling is handled asynchronously).\n\n### Labels\n\n public MapField\u003cstring, string\u003e Labels { get; }\n\nInput only. Labels associated to this specific profile. These labels will\nget merged with the deployment labels for the final data set. See\ndocumentation on deployment labels for validation rules and limits.\n\n### Name\n\n public string Name { get; set; }\n\nOutput only. Opaque, server-assigned, unique ID for this profile.\n\n### ProfileBytes\n\n public ByteString ProfileBytes { get; set; }\n\nInput only. Profile bytes, as a gzip compressed serialized proto, the\nformat is \u003chttps://github.com/google/pprof/blob/master/proto/profile.proto\u003e.\n\n### ProfileName\n\n public ProfileName ProfileName { get; set; }\n\n[ProfileName](/dotnet/docs/reference/Google.Cloud.Profiler.V2/latest/Google.Cloud.Profiler.V2.ProfileName)-typed view over the [Name](/dotnet/docs/reference/Google.Cloud.Profiler.V2/latest/Google.Cloud.Profiler.V2.Profile#Google_Cloud_Profiler_V2_Profile_Name) resource name property.\n\n### ProfileType\n\n public ProfileType ProfileType { get; set; }\n\nType of profile.\nFor offline mode, this must be specified when creating the profile. For\nonline mode it is assigned and returned by the server.\n\n### StartTime\n\n public Timestamp StartTime { get; set; }\n\nOutput only. Start time for the profile.\nThis output is only present in response from the ListProfiles method."]]