Dela via


[FIXED] Importing and Exporting Perfmon Counters [download]

(NOTE: A bug was reported about errors (missing stored procedures) when trying to add the SQL file to the DB.I have fixed that bug and moved the downloads to CodePlex. Please use this link to get the tool: https://perfmonimportexport.codeplex.com/ )

I am posting this utility to help people who need to import or export perfmon counters within a Visual Studio Load Test Results database. The zip file in this post contains a stand-alone executable and the necessary SQL code for performing the imports and exports. I have also included the core C# source code for the classes that do the actual work so you can see how the import and export happen.

Please see the included RTF help file (portions reproduced below) for setup and usage instructions. Please provide any feedback through the codeplex project site.


Perfmon Import Export tool

This tool provides a quick interface for importing and exporting Performance Monitor counters from/to a Visual Studio Load test Results database. The bulk of the work is done inside the SQL database itself and this program simply facilitates the work of choosing the necessary items and locations for the work. The code is taken from a reporting tool project I am working on (not yet publicly released) and therefore requires a few manual steps before it gets used the first time. It also does not have a ton of error checking.

 

Setup

In order to prep the database:

  • Open SQL Server Management Studio (or any other tool that allows you to execute multiple SQL commands from a single file) and load the TSL_Code_For_SqlDb.sql file.
  • Execute the script against the LoadTest2010 database. This will create the following items:
    • TABLE TSL_StagingTableForPerfmonImports
    • VIEW MTSL_View_PerfmonInstanceNamesAndIds
    • PROCEDURE TSL_prc_GetStartingValuesForImportingPerfmon
    • PROCEDURE TSL_prc_UpdatePerfmonTablesFromImport
    • PROCEDURE TSL_prc_PerfCounterExportToCSV
  • If you get any messages that the table, view or procedure already exists, this means that you have used a beta copy of the reporting tool at some point. Manually remove or delete the item in question and re-run that part of the script. This should NOT break the reporting tool, but since there are a number of older versions of the tool floating around, you need to make sure that the version with this tool is the one being used.

 

The Tool’s Interface

(see included RTF file)

Importing Performance Counters

(see included RTF file)

Exporting Performance Counters

(see included RTF file)

Unblocking the downloaded ZIP File

Be sure to unblock the zip file after downloading it. Right click on the zip and choose “Properties” Then click on “Unblock”

Capture

Comments

  • Anonymous
    April 07, 2015
    Hi I am unable to export all loadtest results into excel file some of files are always missiong in excel file? any suggestion? Thank you.

  • Anonymous
    April 07, 2015
    Gopal, I will be glad to help you with this. Can you please send me an email offline with the details of what you are trying to do and what is missing? (Geoffgr@hotmail.com) ALL, when we get this resolved, I will post the fix on this thread.

  • Anonymous
    January 08, 2016
    where can I find/download the TSL_Code_For_SqlDb.sql file? Thx