1. The aggregation period
If you enable diagnostic for a VM, all the metrics data will be stored in a storage account table.
The aggregation period is in the table name. For example: WADMetricsPT1HP10DV2S20190927
PT1H / PT1M: The MetricAggregation value of PT1M and PT1H signify an aggregation over a minute and an aggregation over an hour
P10D : It means that it contains 10 days data
20190927: It is the start aggregation period.
2. Rowkey value
Just as mentioned in the official documentation, it follows the format : The descending time tick calculation is max time ticks minus the time of the beginning of the aggregation period.
I will take one record in my table as a sample:
RowKey -> :2518363979999999999__:005CProcessor:0020Information:0028:005FTotal:0029:005C:0025:0020User:0020Time
TIMESTAMP -> 2019-08-15T21:00:00.000Z
Firstly, the RowKey value contains some Basic Latin characters in Unicode.
:005C = \
:0020 = blank space
So, the readable RowKey would looks like:
:2518363979999999999__:\Processor Information(-Total)\% User Time
Then, let's talk about the number -- 2518363979999999999.
As the record is from table "WADMetricsPT1HP10DV2S20190808", so:
In C#, you may get the value as:
DateTime.MaxValue.Ticks - (new DateTime(2019,08,08,0,0,0,DateTimeKind.Utc).Ticks)
In java, you may try the following code:
public class TickTest {
public static Instant MAX = Instant.parse("9999-12-31T23:59:59.999Z");
public static long toTicks(Instant start)
{
return toTicks(start, MAX);
}
public static long toTicks(Instant start, Instant end)
{
return Duration.between(start, end).toMillis() * 10000;
}
// Test
public static void main(String[] args) {
System.out.println(toTicks(Instant.parse("2019-08-08T00:00:00.000Z")));
}
}