Performance Evaluator in C# [closed] - c#

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I need to develop an evaluation tool using C# that will run on the system for hours and then will show the overal performance of the system.
The system is supposed to run a service and we want to evaluate how this service is affecting the performance of the system. Will be great if I could use the performance counters that are available in "Windows Performance Monitor"... I'm not sure if there is any API available for developers to use them.
I was just looking for suggestions...
Thanks

If it were me, I'd use perfmon. The advantages are:
Well known data archiving model that offers multiple formats.
Existing tooling to slice and dice the data, including visualization.
Integrates with other systems if the client cares (ie lets them suck the data in to other performance tooling).
Someone else's code. :)
You can wrap perfmon and invoke it programatically if you want. Worst case just invoke it via the command line and start/stop collection that way.
Of course you can also expose your own performance counters for app specific stuff too. There are loads of APIs for this for just about every programming environment I can think of on Windows, including of course C#.

I would strongly suggest you use an existing option like automating the collection of WPM statistics.
otherwise C# may not be the best choice since hardware is almost completely abstracted away from the code by the runtime. additionally the application may require sufficient resources and time to contaminate your results. usually the performace cost between C++ and C# is neglible, but in this case could be a problem.
Good luck.

Related

Is C# truly viable for a modern web-socket server? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I need to develop a fairly scalable socket server for an HTML5 / Mobile based turn-based type game.
Time is a real factor in this as I need to prototype out something in 3 months. I have extensive (years) of experience in C# and zero experience in Node or Erlang which I've singled out as the perfect languages for this project. Unfortunately, both of those languages will have a lot of learning curve associated with them and things such as code quality, unit tests, maintainability I will have no experience with so I imagine the code will be of a poor quality.
How bad of a decision will it be to choose to go with C# for this project to save development time as I will have a lot more headaches with scalability and things down the line.
Is C# seriously considered viable for a modern web-app socket server?
A person can write bad code on any platform. Or good code. Yes you can write a very good low impact highly-scalable server in c#. But if this is the first such you've written (regardless of platform), chances are you'll fail to write it efficiently, and then conclude it was the platform's fault.
As an example, the web-socket server that drives instant updates here on SO/SE is written in c#, handles 60k+ connections, and barely registers as any CPU. But it was designed for that, with fully async network access, buffer-recycling, dedicated worker threads, etc.
Actually, if you are specifically looking for web-socket code, then .NET 4.5 on Windows 8 will include inbuilt web-socket support via HTTP.SYS (with managed wrappers, obviously), but it can be done manually. I could possibly even share the library we wrote to do it.
Short: Yes.
Long: c# is statically typed, and it's actually compiled to native code (on Windows) and the speed is simply awesome in my experience. Consider it like C++ with garbage collector :-) Value types + true generics make things much faster than e.g. Java, and I would consider it good enough, too.
Note that you should not get scared by benchmarks game, it uses Mono.
And if you would really get into trouble, you can do unsafe operations if you really need them. So no need to worry for the future.

Stand alone C# compiler [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
We have a software which we use in-house for our day to day work.
It is like a customize CRM (sort of) and Bug Tracking software. We had a small team of 3 developers who had developed this software. Now this team is also working on other assignments.
Recently we are receiving a lot of request for adding functionality from users (who are our employees and all of them are developers working of different projects) in our firm. The original team that created this software does not have enough time to work on enhancing this software. So instead of spending a lot of time in updating as per request and the updating the executable of software for each user, we want to implement a programming/scripting solution that is if possible free and open source.
I was thinking of adding support for a language which is similar to C# to our application. This way the developers will add the features that they require on their own in their spare time if they really need a feature!
Can anyone point me to some such implementation already existing?
I don't know if I am taking the right decision or not regarding C# I would like to get opinion of experts on this also.
TIA
The framework already comes with a C# compiler you can use at execution time via CSharpCodeProvider.
You might want to look at the source code to Snippy, a small tool I wrote for C# in Depth - that compiles code on the fly, and can act as a reasonably simple introduction to CSharpCodeProvider.
I think I'd look at a scripting solution here; probably IronPython is the easiest to bundle and host, but others are available (including Javascript.NET, IronRuby, IronScheme, Boo, F#, etc)

SQLite a good choice for C#? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
Would it be a good choice for use within a WCF service written in C#? I'm currently using FirebirdSql, but that's giving me way too many problems. Documentation and support is also horrible.
edit: Sorry, I should have been more specific when asking the question. What I meant was whether or not SQLite is a good choice for an embedded database within C#. MS SQL is out of the question for this one.
SQLite is a great platform for any language, however there are small concerns I've had with it under .NET.
It is natively compiled. This breaks .NET's AnyCPU Implementations of .NET (i.e. you have to explicitly distribute a 32bit & 64bit version of your app, and have some hand-written rules in your .csproj (MSBUILD) file to select the different dependencies based on what you select.
It has some sticky threading issues. You're going to run into trouble if you're trying to use the same DB from multiple places (multiple instances of your app) etc. It's doable, but it basically uses a simplistic form of database/table locking to achieve this, which could be a major concern based on your program.
All In all i really like SQLite, but if I could find one that didn't require a redistributable (*cough*SQL Express*cough*), I would use another embedded DBMS for .NET Apps. To date I havent found one aside from Raven DB but that's a document DB.
Edit: Note, Raven DB Is also only free for open-source applications. It's not suitable for proprietary applications unless you're willing to shell out for a licence, so when looking into it please be sure to factor it into your budget.
SQL Express always works well

Opensource projects to learn from [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I often read that one of the best ways to continue learning how to programme is to study great opensource projects out there in the wild. Can somewhere recommend a good open source C# project that they learned a lot from. I've been coding a couple of years, both windows and web apps, pretty standard stuff, sql server, asp .net. I'm particulary interested in improving my skills in building well architectured n tier apps
Thanks,
Brendan
Microsoft's own ASP.Net MVC project is open source. It's under their own license, which is probably pretty restrictive about what you can actually do with the code. But it's a pretty large project and interesting to look at.
Have you looked at Codeplex? There are over 800 open source C# projects there.
At the general level, I've found that standard library code is often good to learn from. Reading the source to application code is certainly useful. However, reading the code to STL, or D's std.algorithm or something that is similar, teaches you how to think on a higher level, and to create generic, reusable code. In contrast, application code is often more ad-hoc and heavier on boilerplate, and therefore not as educational.
For your specific case, I'd read the code to the libraries/frameworks you're using. It's interesting in and of itself to know how these things work instead of taking them as magic, and they're written by top-tier programmers and probably much higher quality and much more dense in terms of significant programming concepts per line than most application code.
MediaPortal. Some of it is fabulous, some of it is bad. However, if there is anything you want to do, its in there somewhere.
How about the OpenJDK (the open source version of the
Java Development Kit)?
Here is OpenJDK 6
Here is OpenJDK 7 (release planned for 2010 or so)
Have a look at the NHibernate code its fantastic
their repository is here

Implementing trial app in C# [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
Duplicate
Time bomb needed in asp.net application
I've done developing my app in C#. I need some info of how I can implement 'trial' functionality for my app (I want to let the user use the app for 30 day for example)
Take a look at these tools:
.NET Licensing Pro
SerialShield SDK
PC Guard
Maxtocode
DeployLX Licensing
There are a lot of good answer in this question
Time bomb needed in ASP.NET application
There's also the solutions from Xheo, in particular DeployLX.
A specific commercial solution I've used is from Aladdin. They offer a USB dongle or a "software dongle" that allows you to pick and choose what features are enabled/disabled. The USB dongles even come with a battery-operated clock sealed in them so that gaming the system clock doesn't get around your protection.
Some people may say that any system like this can be broken. This is true. However, I've found Aladdin tools can be used to make cracking very difficult. Pair that with improving your protection on subsequent releases and what you get is a product that takes a lot of time and effort (cost) to break.
There's a related discussion on this SO question: Software evaluation licensing.
You can also check LicenseSpot which gives you the ability to control the license via the online license manager with activation, revoking and trial extensions.

Categories

Resources