Ниже приведен пример использования операции GetSvc для получения статистики выполнения операций, которая собрана в памяти BI-сервера. В запросе передается список операций, по которым необходимо получить статистику. В ответе приходит запрошенная информация.
{
"GetSvc" :
{
"tArg" :
{
"pattern" :
{
"operationsStat" :
{
"ids" :
{
"it" :
[
"OpenMetabase",
"CloseMetabase",
"OpenPrx",
"ClosePrx",
"GetPrxMd",
"SetPrxMd"
]
}
}
}
}
}
}
{
"GetSvcResult" :
{
"meta" :
{
"operationsStat" :
{
"its" :
{
"it" :
[
{
"id" : "OpenMetabase",
"totalCount" : "1",
"faultsCount" : "0",
"totalTime" : "2907",
"maxTime" : "2907",
"minTime" : "2907",
"longRequest" :
{
"OpenMetabase" :
{
"tDef" :
{
"id" : "WAREHOUSE",
"n" :
{
"@nil" : "true"
},
"k" :
{
"@nil" : "true"
},
"scope" :
{
"@nil" : "true"
},
"locale" :
{
"@nil" : "true"
},
"logonData" :
{
"@nil" : "true"
}
},
"tCreds" :
{
"user" :
{
"id" : "sa",
"domain" :
{
"@nil" : "true"
}
},
"pass" : "Qwerty1",
"imperson" :
{
"@nil" : "true"
},
"useMetabase" :
{
"@nil" : "true"
},
"oauth" :
{
"@nil" : "true"
},
"verifier" :
{
"@nil" : "true"
},
"bin" :
{
"@nil" : "true"
},
"useGuestCreds" :
{
"@nil" : "true"
},
"userCertificate" :
{
"@nil" : "true"
}
},
"tArg" :
{
"createNew" :
{
"@nil" : "true"
},
"skipOpen" :
{
"@nil" : "true"
},
"newPassword" :
{
"@nil" : "true"
},
"sessCookie" :
{
"@nil" : "true"
},
"passChangingWarnsAsErrors" :
{
"@nil" : "true"
}
}
}
}
},
{
"id" : "OpenPrx",
"totalCount" : "1",
"faultsCount" : "0",
"totalTime" : "1484",
"maxTime" : "1484",
"minTime" : "1484",
"longRequest" :
{
"OpenPrx" :
{
"tObject" :
{
"id" : "FOFEFHEKNAAMFOAEJACKCAIKHHBICCGEELKEKCLGIPHJKJLL!M!6334"
},
"tArg" :
{
"args" :
{
"updateCache" :
{
"@nil" : "true"
},
"args" :
{
"@nil" : "true"
},
"bind" :
{
"@nil" : "true"
},
"openForEdit" :
{
"@nil" : "true"
}
},
"metaGet" :
{
"@nil" : "true"
}
}
}
}
},
{
"id" : "ClosePrx",
"totalCount" : "1",
"faultsCount" : "0",
"totalTime" : "16",
"maxTime" : "16",
"minTime" : "16",
"longRequest" :
{
"ClosePrx" :
{
"tPrx" :
{
"id" : "FOFEFHEKNAAMFOAEJACKCAIKHHBICCGEELKEKCLGIPHJKJLL!M!S!PLFNPHNEKNAAMFOAELCIPCFKNGHIADCGEHKCIHKLDKEPMCHBP"
}
}
}
},
{
"id" : "GetPrxMd",
"totalCount" : "1",
"faultsCount" : "0",
"totalTime" : "32",
"maxTime" : "32",
"minTime" : "32",
"longRequest" :
{
"GetPrxMd" :
{
"tPrx" :
{
"id" : "FOFEFHEKNAAMFOAEJACKCAIKHHBICCGEELKEKCLGIPHJKJLL!M!S!PLFNPHNEKNAAMFOAELCIPCFKNGHIADCGEHKCIHKLDKEPMCHBP"
},
"tArg" :
{
"pattern" :
{
"locale" :
{
"@nil" : "true"
},
"names" :
{
"@nil" : "true"
},
"descriptions" :
{
"@nil" : "true"
},
"effectiveRights" :
{
"@nil" : "true"
},
"effectiveRightsSubj" :
{
"@nil" : "true"
},
"fullUrl" :
{
"@nil" : "true"
},
"obInst" : "true",
"pars" :
{
"@nil" : "true"
},
"parsControl" :
{
"@nil" : "true"
},
"all" :
{
"@nil" : "true"
},
"sheet" :
{
"pageSettings" : "true"
},
"sheets" : "Get",
"duplicateSheet" :
{
"@nil" : "true"
},
"sheetsFilter" :
{
"@nil" : "true"
},
"tableSources" :
{
"@nil" : "true"
},
"tableSourcesFilter" :
{
"@nil" : "true"
},
"dataSources" :
{
"@nil" : "true"
},
"dataSourcesFilter" :
{
"@nil" : "true"
},
"dataSource" :
{
"@nil" : "true"
},
"slices" :
{
"@nil" : "true"
},
"slicesFilter" :
{
"@nil" : "true"
},
"dataIslands" :
{
"@nil" : "true"
},
"dataIslandsFilter" :
{
"@nil" : "true"
},
"tableIslands" :
{
"@nil" : "true"
},
"tableIslandsFilter" :
{
"@nil" : "true"
},
"controls" :
{
"@nil" : "true"
},
"controlsFilter" :
{
"@nil" : "true"
},
"control" :
{
"@nil" : "true"
},
"undoRedo" :
{
"@nil" : "true"
},
"exportData" :
{
"@nil" : "true"
},
"drillCell" :
{
"@nil" : "true"
},
"options" :
{
"@nil" : "true"
},
"slicesDimensions" :
{
"@nil" : "true"
},
"isRecalced" :
{
"@nil" : "true"
},
"updateHypelinks" :
{
"@nil" : "true"
},
"objectAction" :
{
"@nil" : "true"
},
"canGenWbk" :
{
"@nil" : "true"
},
"genWbk" :
{
"@nil" : "true"
},
"genProblem" :
{
"@nil" : "true"
},
"validations" :
{
"@nil" : "true"
},
"diagnosticReport" :
{
"@nil" : "true"
},
"selectedGrid" :
{
"@nil" : "true"
},
"dimAttrsNaming" :
{
"@nil" : "true"
},
"changedCellsStyles" :
{
"@nil" : "true"
},
"vizSelectionImpact" :
{
"@nil" : "true"
},
"styleSheets" :
{
"@nil" : "true"
},
"hasEventHandler" :
{
"@nil" : "true"
},
"objDrillInfo" :
{
"@nil" : "true"
},
"dataArea" :
{
"@nil" : "true"
},
"outOfRangeAfterRecalc" :
{
"@nil" : "true"
},
"attachments" :
{
"@nil" : "true"
}
},
"refresh" :
{
"@nil" : "true"
}
}
}
}
}
]
}
}
}
}
}
public static GetSvcResult GetBIServerStatistic()
{
var somClient = new SomPortTypeClient(); // Прокси-объект для выполнения операций
// Параметры выполнения операции
var tGet = new GetSvc()
{
tArg = new GetSvcArg()
{
pattern = new SvcPattern()
{
operationsStat = new OperationsStatPattern()
{
ids = new string[] { "OpenMetabase", "CloseMetabase", "OpenPrx", "ClosePrx", "GetPrxMd", "SetPrxMd" }
}
}
}
};
// Получение статистики
var result = somClient.GetSvc(tGet);
return result;
}
См. также: