G2Engine Statistics
Statistics
stats
stats()
returns a JSON document that provides basic statistics on requests made through the G2 object. It returns things such as the number of records loaded, the duration of processing time, and the number of retries made.
g2_engine.stats(response_bytearray)
Parameters
- response_bytearray: (bytearray) Object to store the output of the method.
Click to expand `stats()` example
Example
#! /usr/bin/env python3
from senzing import G2Engine, G2Exception
# REPLACE /home/user/your_project with the path to your Senzing project
senzing_engine_configuration_json = '{ "PIPELINE": { "CONFIGPATH": "/home/user/your_project/etc", "SUPPORTPATH": "/home/user/your_project/data", "RESOURCEPATH": "/home/user/your_project/resources" }, "SQL": { "CONNECTION": "sqlite3://na:na@/home/user/your_project/var/sqlite/G2C.db" } }'
g2_engine = G2Engine()
response_bytearray = bytearray()
try:
g2_engine.init("G2Engine", senzing_engine_configuration_json)
g2_engine.stats(response_bytearray)
g2_engine.destroy()
print(response_bytearray.decode())
except G2Exception as err:
print(err)
Output
{
"workload":
{
"apiVersion": "3.10.0.24121",
"loadedRecords": -1,
"addedRecords": 0,
"optimizedOut": 0,
"optimizedOutSkipped": 0,
"newObsEnt": 0,
"obsEntHashSame": 0,
"obsEntHashDiff": 0,
"partiallyResolved": 0,
"deletedRecords": 0,
"changeDeletes": 0,
"reevaluations": 0,
"repairedEntities": 0,
"duration": 0,
"retries": 0,
"candidates": 0,
"actualAmbiguousTest": 0,
"cachedAmbiguousTest": 0,
"libFeatCacheHit": 0,
"libFeatCacheMiss": 0,
"resFeatStatCacheHit": 0,
"resFeatStatCacheMiss": 0,
"libFeatInsert": 0,
"resFeatStatInsert": 0,
"resFeatStatUpdateAttempt": 0,
"resFeatStatUpdateFail": 0,
"unresolveTest": 0,
"abortedUnresolve": 0,
"gnrScorersUsed": 0,
"unresolveTriggers":
{
"normalResolve": 0,
"update": 0,
"relLink": 0,
"extensiveResolve": 0,
"ambiguousNoResolve": 0,
"ambiguousMultiResolve": 0
},
"reresolveTriggers":
{
"abortRetry": 0,
"unresolveMovement": 0,
"multipleResolvableCandidates": 0,
"resolveNewFeatures": 0,
"newFeatureFTypes":
[]
},
"reresolveSkipped": 0,
"filteredObsFeat": 0,
"expressedFeatureCalls":
[],
"expressedFeaturesCreated":
[],
"scoredPairs":
[],
"cacheHit":
[],
"cacheMiss":
[],
"redoTriggers":
[],
"latchContention":
[],
"highContentionFeat":
[],
"highContentionResEnt":
[],
"genericDetect":
[],
"candidateBuilders":
[],
"suppressedCandidateBuilders":
[],
"suppressedScoredFeatureType":
[],
"reducedScoredFeatureType":
[],
"suppressedDisclosedRelationshipDomainCount": 0,
"CorruptEntityTestDiagnosis":
{},
"threadState":
{
"active": 0,
"idle": 1,
"sqlExecuting": 0,
"loader": 0,
"resolver": 0,
"scoring": 0,
"dataLatchContention": 0,
"obsEntContention": 0,
"resEntContention": 0
},
"systemResources":
{
"initResources":
[
{
"physicalCores": 16
},
{
"logicalCores": 16
},
{
"totalMemory": "31.2GB"
},
{
"availableMemory": "29.4GB"
}
],
"currResources":
[
{
"availableMemory": "29.4GB"
},
{
"activeThreads": 0
},
{
"workerThreads": 1
},
{
"systemLoad":
[]
}
]
}
}
}