performancecounter

Measure executing time on ARM Cortex-A8 using hardware counter

旧街凉风 提交于 2019-11-30 00:58:43
I'm using a Exynos 3110 processor (1 GHz Single-core ARM Cortex-A8, e.g. used in the Nexus S) and try to measure execution times of particular functions. I have an Android 4.0.3 running on the Nexus S. I tried the method from [1] How to measure program execution time in ARM Cortex-A8 processor? I loaded the kernel module to allow reading the register values in user mode. I am using the following program to test the counter: static inline unsigned int get_cyclecount (void) { unsigned int value; // Read CCNT Register asm volatile ("MRC p15, 0, %0, c9, c13, 0\t\n": "=r"(value)); return value; }

The requested Performance Counter is not a custom counter, it has to be initialized as ReadOnly

和自甴很熟 提交于 2019-11-29 23:36:12
I am getting repeated errors about the ReadOnly property on performance counters whenever I try to debug a .NET windows service app. This app works fine on x86 windows vista, or x86 windows 2003. It's just stopped working on my new 64bit dev machine. I've run the relevant InstallUtil invocations on 64bit and 32bit command line VCVARS.bat, in admin mode. I get no errors setting up the category and each perf counter . But, regardless of whether I set the perf ctrs as readonly or not, I get this: The requested Performance Counter is not a custom counter, it has to be initialized as ReadOnly.

What would make PerformanceCounterCategory.Exists hang indefinitely?

房东的猫 提交于 2019-11-29 22:08:22
I've got an application that uses performance counters, that has worked for months. Now, on my dev machine and another developers machine, it has started hanging when I call PerformanceCounterCategory.Exists. As far as I can tell, it hangs indefinitely. It does not matter which category I use as input, and other applications using the API exhibits the same behaviour. Debugging (using MS Symbol Servers) has shown that it is a call to Microsoft.Win32.RegistryKey that hangs. Further investigation shows that it is this line that hangs: while (Win32Native.ERROR_MORE_DATA == (r = Win32Native

Retrieve process network usage

帅比萌擦擦* 提交于 2019-11-29 21:01:34
How can I get a process send/receive bytes? the preferred way is doing it with C#. I've searched this a lot and I didn't find any simple solution for this. Some solutions suggested to install the WinPCap on the machine and to work with this lib. Like this guy asked: Need "Processes with Network Activity" functionality in managed code - Like resmon.exe does it I don't want the overhead of the lib. Is there a simple solution for this? Actually I want the exactly data that the Resource Monitor of Windows gives under the "Processes with Network Activity" tab: How does the Resource Monitor of

Is there anyway to read performance counters on OS X Mountain Lion?

。_饼干妹妹 提交于 2019-11-29 20:27:50
Shark, Apple's profiler which let you configure custom performance counters, is no longer supported in OSX Mountain Lion since it can't run a 32-bit kernel. Instruments.app, Apple's replacement for Shark, doesn't seem to support reading performance counters such as L1 cache hits/misses**. Is there anyway to actually setup and read performance counters on OS X? Even if there is no application, is there some user-land API to do this? **Instruments.app does seem to have an interface for performance counters, but on my Retina MacBook Pro, the PM Events window lists no events, and indicates "Device

How to add a new counter to an existing performance counter category without deleting the old counters?

最后都变了- 提交于 2019-11-29 17:32:34
问题 I have a custom counter category, to which I need to add a new counter, without deleting or resetting any existing counters. How can I do this? I tried using CounterExists(), but even after I create the counter, how can I associate it to a CounterCreationDataCollection item and associate it to my existing counter category? 回答1: The best way to do this I found, especially since there doesn't seem to be much info on this topic, is to preserve the existing raw values and then re-apply them after

Get Performance Counter Instance Name (w3wp#XX) from ASP.NET worker process ID

点点圈 提交于 2019-11-29 17:24:24
问题 I would like to display some memory statistics (working set, GCs etc.) on a web page using the .NET/Process performance counters. Unfortunately, if there are multiple application pools on that server, they are differentiated using an index (#1, #2 etc.) but I don't know how to match a process ID (which I have) to that #xx index. Is there a programmatic way (from an ASP.NET web page)? 回答1: The first hit on Google: Multiple CLR performance counters appear that have names that resemble "W3wp#1"

Retrieving Total amount of RAM on a computer [duplicate]

≡放荡痞女 提交于 2019-11-29 13:39:23
Possible Duplicate: C# - How do you get total amount of RAM the computer has? The following would retrieve how much ram is available: PerformanceCounter ramCounter; ramCounter = new PerformanceCounter("Memory", "Available MBytes"); Console.WriteLine("Total RAM: " + ramCounter.NextValue().ToString() + " MB\n\n"); Of course we will have to use the System.Diagnostics; class. Does performancecounter have any functionality for retrieving the amount of RAM of a particular machine? I'm not talking about the amount of ram used or unused. I'm talking about the amount of ram the machine has. This

VS 2010 Load Tests Results with custom counters

会有一股神秘感。 提交于 2019-11-29 11:34:46
I am new on Load Testing (and in general, testing) with visual studio 2010 and I am dealing with several problems. My question is, is there any way possible, to add a custom test variable on the Load Test Results? I have the following UnitTest: [TestMethod] public void Test() { Stopwatch testTimer = new Stopwatch(); testTimer.Start(); httpClient.SendRequest(); testTimer.Stop(); double requestDelay = testTimer.Elapsed.TotalSeconds; } This UnitTest is used by many LoadTests and I want to add the requestDelay variable to the Load Test Result so I can get Min, Max and Avg values like all others

Counter of type RateOfCountsPerSecond32 always shows 0

走远了吗. 提交于 2019-11-29 09:23:15
I have a windows service that serves messages of some virtual queue via a WCF service interface. I wanted to expose two performance counters - The number of items on the queue The number of items removed from the queue per second The first one works fine, the second one always shows as 0 in PerfMon.exe, despite the RawValue appearing to be correct. I'm creating the counters as such - internal const string PERF_COUNTERS_CATEGORY = "HRG.Test.GDSSimulator"; internal const string PERF_COUNTER_ITEMSINQUEUE_COUNTER = "# Messages on queue"; internal const string PERF_COUNTER_PNR_PER_SECOND_COUNTER =