Closed dedreira closed 5 years ago
Could you try removing the spaces from around the ','? Because we feed the OData information straight into the rest call (without any parsing) this could cause the url to become invalid.
If this does not work @matthchr , could this be a regression in the .NET SDK?
Hi, I've tried what you said, removing white spaces around , also tried to execute these sentences:
//No white-spaces
IPagedEnumerable
//No select clause
IPagedEnumerable
//Using asynchronous methods as seen in this example:
//https://github.com/Azure-Samples/azure-batch-samples/blob/master/CSharp/ArticleProjects/EfficientListQueries/Program.cs
ODATADetailLevel detail = new ODATADetailLevel();
detail.ExpandClause = "stats";
List
and the results are the same, Statistics property is null . . .
How long are you waiting between your task being created and when you call list with stats?
I believe there is a delay for the stats to be aggregated - I'd have to double check the aggregation period but I thought it was something like 15m, so it would be expected to not get stats for the first 15m.
The tasks I'm querying now for the stats were created two days ago :(
@dedreira If you would be willing to share the batch account name and region we can check the logs to verify if the Batch Service is returning you any statistics and look into why this is happening.
Hi again,
I was wondering.... maybe the task statistics are only available when the task is completed? It's not possible to view statistics for running tasks??
That's it, statistics property for a Cloud Task is not available until task is Completed....
Hi, I'm trying to retrieve CloudTask statistics using this sentence:
IPagedEnumerable tasks = job.ListTasks(new ODATADetailLevel(selectClause: "id , stats", expandClause: "stats"));
Referring to this article: https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.batch.cloudtask.statistics?view=azure-dotnet
But when I iterate over the task collection while debugging I can see that Statistics property hasn't been populated.