Получение статистики выполнения операций

Ниже приведен пример использования операции GetSvc для получения статистики выполнения операций, которая собрана в памяти BI-сервера. В запросе передается список операций, по которым необходимо получить статистику. В ответе приходит запрошенная информация.

SOAP-запрос:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetSvc xmlns="http://www.fsight.ru/PP.SOM.Som">
<tArg xmlns="">
<pattern>
<operationsStat>
<ids>
  <it>OpenMetabase</it>
  <it>CloseMetabase</it>
  <it>OpenPrx</it>
  <it>ClosePrx</it>
  <it>GetPrxMd</it>
  <it>SetPrxMd</it>
  </ids>
  </operationsStat>
  </pattern>
  </tArg>
  </GetSvc>
  </s:Body>
  </s:Envelope>

SOAP-ответ:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<GetSvcResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<meta xmlns="">
<operationsStat>
<its>
<it>
  <id>OpenMetabase</id>
  <totalCount>1</totalCount>
  <faultsCount>0</faultsCount>
  <totalTime>2907</totalTime>
  <maxTime>2907</maxTime>
  <minTime>2907</minTime>
<longRequest>
<OpenMetabase xmlns="http://www.fsight.ru/PP.SOM.Som">
<tDef xmlns="">
  <id>PPREPOSITORY</id>
  <n xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <k xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <scope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <locale xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <logonData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  </tDef>
<tCreds xmlns="">
<user>
  <id>sa</id>
  <domain xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  </user>
  <pass>Qwerty1</pass>
  <imperson xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <useMetabase xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <oauth xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <verifier xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <bin xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <useGuestCreds xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <userCertificate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  </tCreds>
<tArg xmlns="">
  <createNew xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <skipOpen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <newPassword xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <sessCookie xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <passChangingWarnsAsErrors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  </tArg>
  </OpenMetabase>
  </longRequest>
  </it>
<it>
  <id>OpenPrx</id>
  <totalCount>1</totalCount>
  <faultsCount>0</faultsCount>
  <totalTime>1484</totalTime>
  <maxTime>1484</maxTime>
  <minTime>1484</minTime>
<longRequest>
<OpenPrx xmlns="http://www.fsight.ru/PP.SOM.Som">
<tObject xmlns="">
  <id>FOFEFHEKNAAMFOAEJACKCAIKHHBICCGEELKEKCLGIPHJKJLL!M!6334</id>
  </tObject>
<tArg xmlns="">
<args>
  <updateCache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <args xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <bind xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <openForEdit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  </args>
  <metaGet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  </tArg>
  </OpenPrx>
  </longRequest>
  </it>
<it>
  <id>ClosePrx</id>
  <totalCount>1</totalCount>
  <faultsCount>0</faultsCount>
  <totalTime>16</totalTime>
  <maxTime>16</maxTime>
  <minTime>16</minTime>
<longRequest>
<ClosePrx xmlns="http://www.fsight.ru/PP.SOM.Som">
<tPrx xmlns="">
  <id>FOFEFHEKNAAMFOAEJACKCAIKHHBICCGEELKEKCLGIPHJKJLL!M!S!PLFNPHNEKNAAMFOAELCIPCFKNGHIADCGEHKCIHKLDKEPMCHBP</id>
  </tPrx>
  </ClosePrx>
  </longRequest>
  </it>
<it>
  <id>GetPrxMd</id>
  <totalCount>1</totalCount>
  <faultsCount>0</faultsCount>
  <totalTime>32</totalTime>
  <maxTime>32</maxTime>
  <minTime>32</minTime>
<longRequest>
<GetPrxMd xmlns="http://www.fsight.ru/PP.SOM.Som">
<tPrx xmlns="">
  <id>FOFEFHEKNAAMFOAEJACKCAIKHHBICCGEELKEKCLGIPHJKJLL!M!S!PLFNPHNEKNAAMFOAELCIPCFKNGHIADCGEHKCIHKLDKEPMCHBP</id>
  </tPrx>
<tArg xmlns="">
<pattern>
  <locale xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <names xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <descriptions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <effectiveRights xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <effectiveRightsSubj xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <fullUrl xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <obInst>true</obInst>
  <pars xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <parsControl xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <all xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<sheet>
  <pageSettings>true</pageSettings>
  </sheet>
  <sheets>Get</sheets>
  <duplicateSheet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <sheetsFilter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <tableSources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <tableSourcesFilter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <dataSources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <dataSourcesFilter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <dataSource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <slices xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <slicesFilter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <dataIslands xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <dataIslandsFilter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <tableIslands xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <tableIslandsFilter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <controls xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <controlsFilter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <control xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <undoRedo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <exportData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <drillCell xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <options xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <slicesDimensions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <isRecalced xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <updateHypelinks xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <objectAction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <canGenWbk xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <genWbk xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <genProblem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <validations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <diagnosticReport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <selectedGrid xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <dimAttrsNaming xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <changedCellsStyles xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <vizSelectionImpact xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <styleSheets xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <hasEventHandler xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <objDrillInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <dataArea xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <outOfRangeAfterRecalc xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  <attachments xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  </pattern>
  <refresh xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
  </tArg>
  </GetPrxMd>
  </longRequest>
  </it>
  </its>
  </operationsStat>
  </meta>
  </GetSvcResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON-запрос:

{
"GetSvc" :
{
"tArg" :
{
"pattern" :
{
"operationsStat" :
{
"ids" :
{
"it" :
[
"OpenMetabase",
"CloseMetabase",
"OpenPrx",
"ClosePrx",
"GetPrxMd",
"SetPrxMd"
]
}
}
}
}
}
}

JSON-ответ:

{
"GetSvcResult" :
{
"meta" :
{
"operationsStat" :
{
"its" :
{
"it" :
[
{
"id" : "OpenMetabase",
"totalCount" : "1",
"faultsCount" : "0",
"totalTime" : "2907",
"maxTime" : "2907",
"minTime" : "2907",
"longRequest" :
{
"OpenMetabase" :
{
"tDef" :
{
"id" : "PPREPOSITORY",
"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;
}

См. также:

Работа с репозиторием