Applies to - Web Server, Application Server & Database server
| Counter | Instance | Object | Description |
|---|---|---|---|
| Processor Queue Length | System | Official link | |
| % Processor Time | _Total | Processor Information | |
| Available MBytes | Memory | ||
| % Processor time | w3wp## | Process |
| public void Main() | |
| { | |
| for (int counter = 1; counter < 5; counter++) | |
| { | |
| if (counter % 3 == 0) | |
| { | |
| WriteFactorialAsyncUsingTask(counter); | |
| } | |
| else | |
| { |
| private async Task WriteFactorialAsyncUsingAwait(int facno) | |
| { | |
| int result = await Task.Run(()=> FindFactorialWithSimulatedDelay(facno)); | |
| Console.WriteLine("Factorial of {0} is {1}", facno, result); | |
| } | |
| public void Main() | |
| { | |
| for (int counter = 1; counter < 5; counter++) | |
| { | |
| if (counter % 3 == 0) |
| internal void TestExecutionInstanceId() | |
| { | |
| Package pkg = GetPackageFromConstantLocationWithParametersSet(); | |
| DTSExecResult pkgResults = pkg.Execute(); | |
| object executionIdAsObj = pkg.Variables["System::ExecutionInstanceGUID"].Value; | |
| Guid executionId = Guid.Parse(executionIdAsObj.ToString()); | |
| Console.WriteLine(pkgResults.ToString()); | |
| } |
| public void Main() | |
| { | |
| int currentCounterValue = Convert.ToInt32(Dts.Variables["counter"].Value); | |
| int square = currentCounterValue * currentCounterValue; | |
| Dts.Log(string.Format("Inside custom script block value of counter is {0} square is {1}", | |
| currentCounterValue, | |
| square), | |
| 0, | |
| new byte[0]); | |
| Dts.TaskResult = (int)ScriptResults.Success; |
| internal class ProcessStarter | |
| { | |
| internal void StartExeToProcessMessage(string pathToExe, CustomQueueMessage customMsg) | |
| { | |
| string serializedMsg = JsonConvert.SerializeObject(customMsg); | |
| using (Process p = GetProcessAfterStarting(pathToExe)) | |
| { | |
| p.StandardInput.WriteLine(serializedMsg); | |
| p.OutputDataReceived += (sender, args) => Console.WriteLine("Data receied from child exe - {0}", args.Data); | |
| p.EnableRaisingEvents = true; |
| class Program | |
| { | |
| static void Main() | |
| { | |
| string[] args = Environment.GetCommandLineArgs(); | |
| if (args.Length == 1) | |
| { | |
| //Do nothing | |
| } | |
| else if (string.Equals(args[1],"-process")) |
| A sample karel progrma! |
| A sample karel progrma! |
| <%@ Page Language="C#" AutoEventWireup="true" Trace="true" TraceMode="SortByCategory" %> | |
| <html xmlns="http://www.w3.org/1999/xhtml"> | |
| <head runat="server"> | |
| <title>ASP.NET Diagnostic Page</title> | |
| </head> | |
| <body> | |
| <form id="form1" runat="server"> | |
| <% | |
| void DumpIdentityAsTable(object identity) |
Applies to - Web Server, Application Server & Database server
| Counter | Instance | Object | Description |
|---|---|---|---|
| Processor Queue Length | System | Official link | |
| % Processor Time | _Total | Processor Information | |
| Available MBytes | Memory | ||
| % Processor time | w3wp## | Process |