Commit aff38112 aff38112dce02a126bec00ef8b1c669471e50328 by Christian Gerdes

Just notes

1 parent 5846546c
Showing 1 changed file with 64 additions and 0 deletions
...@@ -6,3 +6,67 @@ DotNetUtilities.ToX509Certificate((Org.BouncyCastle.X509.X509Certificate)newCert ...@@ -6,3 +6,67 @@ DotNetUtilities.ToX509Certificate((Org.BouncyCastle.X509.X509Certificate)newCert
6 6
7 http://stackoverflow.com/questions/6128541/bouncycastle-privatekey-to-x509certificate2-privatekey 7 http://stackoverflow.com/questions/6128541/bouncycastle-privatekey-to-x509certificate2-privatekey
8 8
9 # IDEAS
10
11 ## Custom Counters
12
13 Custom counters can be created directly in the database.
14 The [LoadTestRunId] is needed, from the current load test run in the
15 [LoadTestRun] table. This id could be retreived by just getting the latest entry for a ControllerName (since a controller can only run one test at the time).
16 The question is how to get the datasource connection string.
17
18 ### Example 1
19
20 In this case the counter is created as a counter on the highest (root) level in the results counters, using the [CounterCategoryId] for LoadTest:Scenario
21 in the [LoadTestPerformanceCounterCategory] table (below it had the value 6).
22
23 INSERT INTO [dbo].[LoadTestPerformanceCounter] ([LoadTestRunId], [CounterCategoryId], [CounterId], [CounterName], [HigherIsBetter])
24 VALUES (4012, 6, 93, N'CustomCounter', 1)
25
26 The CounterId here is generated (last +1) and then used in the instance as well:
27
28 INSERT INTO [dbo].[LoadTestPerformanceCounterInstance] ([LoadTestRunId], [CounterId], [InstanceId], [LoadTestItemId], [InstanceName], [CumulativeValue], [OverallThresholdRuleResult])
29 VALUES (4012, 93, 622, NULL, N'Custom', 10, 0)
30
31 Here the InstanceId is generated (last +1). InstanceName is the root leef name in the results tree. If the same name as an existing Scenario is used, the counter
32 is placed in that Scenarios branch. If it doesnt exist, it will be placed by its own in the root (as a new Scenario).
33
34 ### Example 2
35
36 In this case we create a CUSTOM Computer in the Computers root list. It can have it's own categories, counters and instances or counters with a single instance.
37
38 INSERT INTO [dbo].[LoadTestPerformanceCounterCategory] ([LoadTestRunId], [CounterCategoryId], [CategoryName], [MachineName], [StartTimeStamp100nSec])
39 VALUES (4012, 13, N'Test', N'CUSTOM', 131293041616203688)
40
41 CounterCategoryId is generated (last +1)
42
43 INSERT INTO [dbo].[LoadTestPerformanceCounter] ([LoadTestRunId], [CounterCategoryId], [CounterId], [CounterName], [HigherIsBetter])
44 VALUES (4012, 13, 92, N'TestCounter', 1)
45
46 CounterCategory here is the one created above, CounterId is generated (last +1)
47
48 INSERT INTO [dbo].[LoadTestPerformanceCounterInstance] ([LoadTestRunId], [CounterId], [InstanceId], [LoadTestItemId], [InstanceName], [CumulativeValue], [OverallThresholdRuleResult])
49 VALUES (4012, 92, 621, NULL, N'systemdiagnosticsperfcounterlibsingleinstance', 100, 1)
50
51 CounterId from above, InstanceId is generated (last +1), InstanceName is a name for the instance or systemdiagnosticsperfcounterlibsingleinstance as above
52
53 CumulativeValue seems to have effect on the graphs max value for the y axis to calculate a range to be used.
54
55 ### Creating values
56
57 Once the counters and instances are set, values (measurements) can be created in the [LoadTestPerformanceCounterSample] table. Below an example for the "User Load" counter
58 for scenarios:
59
60 INSERT INTO [dbo].[LoadTestPerformanceCounterSample] ([LoadTestRunId], [TestRunIntervalId], [InstanceId], [ComputedValue], [RawValue], [BaseValue], [CounterFrequency], [SystemFrequency], [SampleTimeStamp], [SampleTimeStamp100nSec], [CounterType], [ThresholdRuleResult], [ThresholdRuleMessageId])
61 VALUES (4013, 1, 181, 10, 10, 0, 2636718, 2636718, 39550770, 150000000, 65536, 0, NULL)
62 INSERT INTO [dbo].[LoadTestPerformanceCounterSample] ([LoadTestRunId], [TestRunIntervalId], [InstanceId], [ComputedValue], [RawValue], [BaseValue], [CounterFrequency], [SystemFrequency], [SampleTimeStamp], [SampleTimeStamp100nSec], [CounterType], [ThresholdRuleResult], [ThresholdRuleMessageId])
63 VALUES (4013, 2, 181, 10, 10, 0, 2636718, 2636718, 79101540, 300000000, 65536, 0, NULL)
64
65 CounterFrequency seems to be set to the same as SystemFrequency and seems to be the local cpu clock frequency.
66
67 [CounterType] seems to be the int of the system.diagnostics.performancecountertype enum used, in this case probaly NumberOfItems32
68
69 [SampleTimeStamp] seems to be ticks, a multiple of CounterFrequency and the number of seconds of the measurement interval (above 15 seconds)
70
71 [SampleTimeStamp100nSec] seems to be the time passed since the beginning of the counter category timestamp in 100nSec (0,1 micro seconds)
72
......