public static IEnumerable <Label> Labels(this Perftools.Profiles.Sample sample, Profile profile) { return(sample.Label.Select( label => new Label { Name = profile.StringTable[(int)label.Key], Value = profile.StringTable[(int)label.Str] })); }
public void AddNextSample() { _lastSample = new PProfProto.Sample(); _lastSample.Value.AddRange(OwnerBuilder.SampleValuesUnset); _profile.Sample.Add(_lastSample); SamplesCount = SamplesCount + 1; }
public static StackTrace StackTrace(this Perftools.Profiles.Sample sample, Profile profile) { return(new StackTrace( sample.LocationId .Select(id => profile.Location.First(l => l.Id == id)) .Select(l => l.Line[0].FunctionId) .Select(l => profile.Function.First(f => f.Id == l)) .Select(f => profile.StringTable[(int)f.Name]) .Select(s => new StackFrame(s)))); }
internal PProfBuildSession(PProfBuilder owner, PProfBuildSessionState ownerBuildState) { Validate.NotNull(owner, nameof(owner)); Validate.NotNull(ownerBuildState, nameof(ownerBuildState)); _ownerBuildState = ownerBuildState; this.OwnerBuilder = owner; _profile = new PProfProto.Profile(); _lastSample = null; this.SamplesCount = 0; }