This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Query Kind="Program"> | |
<NuGetReference>MeasureIt.exe</NuGetReference> | |
<NuGetReference>Microsoft.Diagnostics.Tracing.TraceEvent</NuGetReference>a | |
<NuGetReference>Rx-Core</NuGetReference> | |
<NuGetReference>Rx-Interfaces</NuGetReference> | |
<NuGetReference>Rx-Linq</NuGetReference> | |
<NuGetReference>Rx-Main</NuGetReference> | |
<Namespace>Microsoft.Diagnostics.Tracing</Namespace> | |
<Namespace>Microsoft.Diagnostics.Tracing.Parsers</Namespace> | |
<Namespace>Microsoft.Diagnostics.Tracing.Parsers.Clr</Namespace> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
perfview -Providers:CodeMarkers -ThreadTime -NoV2Rundown -DataFile:devenv-startup.etl | |
-Merge:false -Zip:false run "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using Microsoft.Diagnostics.Tracing; | |
namespace ETWSamples | |
{ | |
/// <summary> | |
/// How to generate dynamic etw events without inheriting and eventsource class. | |
/// This is not advisable. | |
/// </summary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PerfView /onlyProviders=*Dynamic collect |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.Diagnostics.Tracing; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace ETWSamples | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Change the cookie information to your cookie which can be got from fiddler or any http proxy | |
var wc = new WebClient(); | |
wc.Headers.Add("X_AUTHENTICATION_TOKEN","LBi9REOX6hwCM2HWPfqDGM9EI6KWnoR1GxXFYSu9hmo="); | |
wc.Headers.Add("Accept","application/json"); | |
wc.Headers.Add("Cookie","sec cookie"); | |
var result = await wc.DownloadStringTaskAsync("https://www.yogaglo.com/api/v4/histories?limit=50"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Teacher | |
{ | |
[JsonProperty("first_name")] | |
public string first_name { get; set; } | |
[JsonProperty("last_name")] | |
public string last_name { get; set; } | |
} | |
public class Prop | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var items = JsonConvert.DeserializeObject<PraticeHistory>(result); | |
items.history.Select (h => new { WatchedDate =epoch.AddSeconds( h.date_watched_timestamp).ToLocalTime(), | |
h.video.category, Duration = Convert.ToInt32( h.video.durationMin), h.video.level, h.video.short_description, | |
h.video.style, h.video.title }) | |
.GroupBy (h => h.WatchedDate.ToShortDateString()) | |
.Select (h => new {h.Key, Duration = h.Select (x => x.Duration)}) | |
.Aggregate ((x,y) => x+y)} ) | |
.Dump(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Perfview commandLine | |
"/DataFile:PerfViewData.etl" /CircularMB:500 /MinSecForTrigger:0 /ClrEvents:GC,Binder,Loader,Jit,StopEnumeration,Security,AppDomainResourceManagement,Contention,Exception,Threading,JittedMethodILToNativeMap,OverrideAndSuppressNGenEvents,Type,GCHeapSurvivalAndMovement,GCHeapAndTypeNames,Stack,ThreadTransfer /Providers:"Microsoft-Windows-IIS" /NoNGenRundown " | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aff081fe-0247-4275-9c4e-021f3dc1da35 | |
ee799f41-cfa5-550b-bf2c-344747c1c668 | |
de4649c9-15e8-4fea-9d85-1cdda520c334 | |
de4649c9-15e8-4fea-9d85-1cdda520c334 | |
aff081fe-0247-4275-9c4e-021f3dc1da35 | |
06b94d9a-b15e-456e-a4ef-37c984a2cb4b | |
d55d3bc9-cba9-44df-827e-132d3a4596c2 | |
a1c2040e-8840-4c31-ba11-9871031a19ea | |
3a2a4e84-4c21-4981-ae10-3fda0d9b0f83 | |
23108b68-1b7e-43fa-94fb-ec3066805744 |