mirror of https://gitlab.com/bashrc2/epicyon
More benchmarks
parent
e9509c58b0
commit
e03243b148
|
@ -3849,9 +3849,21 @@ def individualPostAsHtml(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
if not avatarUrl:
|
if not avatarUrl:
|
||||||
avatarUrl = \
|
avatarUrl = \
|
||||||
getPersonAvatarUrl(baseDir, postActor, personCache)
|
getPersonAvatarUrl(baseDir, postActor, personCache)
|
||||||
|
|
||||||
|
# benchmark 2.1
|
||||||
|
timeDiff = int((time.time() - postStartTime) * 1000)
|
||||||
|
if timeDiff > 100:
|
||||||
|
print('TIMING INDIV ' + boxName + ' 2.1 = ' + str(timeDiff))
|
||||||
|
|
||||||
|
return postHtml
|
||||||
updateAvatarImageCache(session, baseDir, httpPrefix,
|
updateAvatarImageCache(session, baseDir, httpPrefix,
|
||||||
postActor, avatarUrl, personCache)
|
postActor, avatarUrl, personCache)
|
||||||
|
|
||||||
|
# benchmark 2.2
|
||||||
|
timeDiff = int((time.time() - postStartTime) * 1000)
|
||||||
|
if timeDiff > 100:
|
||||||
|
print('TIMING INDIV ' + boxName + ' 2.2 = ' + str(timeDiff))
|
||||||
|
|
||||||
postHtml = \
|
postHtml = \
|
||||||
loadIndividualPostAsHtmlFromCache(baseDir, nickname, domain,
|
loadIndividualPostAsHtmlFromCache(baseDir, nickname, domain,
|
||||||
postJsonObject)
|
postJsonObject)
|
||||||
|
@ -4166,6 +4178,12 @@ def individualPostAsHtml(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
likeLink = 'like'
|
likeLink = 'like'
|
||||||
likeTitle = translate['Like this post']
|
likeTitle = translate['Like this post']
|
||||||
likeCount = noOfLikes(postJsonObject)
|
likeCount = noOfLikes(postJsonObject)
|
||||||
|
|
||||||
|
# benchmark 12.1
|
||||||
|
timeDiff = int((time.time() - postStartTime) * 1000)
|
||||||
|
if timeDiff > 100:
|
||||||
|
print('TIMING INDIV ' + boxName + ' 12.1 = ' + str(timeDiff))
|
||||||
|
|
||||||
likeCountStr = ''
|
likeCountStr = ''
|
||||||
if likeCount > 0:
|
if likeCount > 0:
|
||||||
if likeCount > 1:
|
if likeCount > 1:
|
||||||
|
@ -4177,6 +4195,12 @@ def individualPostAsHtml(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
if likedByPerson(postJsonObject, nickname, fullDomain):
|
if likedByPerson(postJsonObject, nickname, fullDomain):
|
||||||
likeLink = 'unlike'
|
likeLink = 'unlike'
|
||||||
likeTitle = translate['Undo the like']
|
likeTitle = translate['Undo the like']
|
||||||
|
|
||||||
|
# benchmark 12.2
|
||||||
|
timeDiff = int((time.time() - postStartTime) * 1000)
|
||||||
|
if timeDiff > 100:
|
||||||
|
print('TIMING INDIV ' + boxName + ' 12.2 = ' + str(timeDiff))
|
||||||
|
|
||||||
likeStr = \
|
likeStr = \
|
||||||
'<a class="imageAnchor" href="/users/' + nickname + '?' + \
|
'<a class="imageAnchor" href="/users/' + nickname + '?' + \
|
||||||
likeLink + '=' + postJsonObject['object']['id'] + \
|
likeLink + '=' + postJsonObject['object']['id'] + \
|
||||||
|
@ -4190,6 +4214,11 @@ def individualPostAsHtml(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
'" alt="' + likeTitle + \
|
'" alt="' + likeTitle + \
|
||||||
' |" src="/' + iconsDir + '/' + likeIcon + '"/></a>\n'
|
' |" src="/' + iconsDir + '/' + likeIcon + '"/></a>\n'
|
||||||
|
|
||||||
|
# benchmark 12.5
|
||||||
|
timeDiff = int((time.time() - postStartTime) * 1000)
|
||||||
|
if timeDiff > 100:
|
||||||
|
print('TIMING INDIV ' + boxName + ' 12.5 = ' + str(timeDiff))
|
||||||
|
|
||||||
bookmarkStr = ''
|
bookmarkStr = ''
|
||||||
if not isModerationPost:
|
if not isModerationPost:
|
||||||
bookmarkIcon = 'bookmark_inactive.png'
|
bookmarkIcon = 'bookmark_inactive.png'
|
||||||
|
@ -4199,6 +4228,10 @@ def individualPostAsHtml(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
bookmarkIcon = 'bookmark.png'
|
bookmarkIcon = 'bookmark.png'
|
||||||
bookmarkLink = 'unbookmark'
|
bookmarkLink = 'unbookmark'
|
||||||
bookmarkTitle = translate['Undo the bookmark']
|
bookmarkTitle = translate['Undo the bookmark']
|
||||||
|
# benchmark 12.6
|
||||||
|
timeDiff = int((time.time() - postStartTime) * 1000)
|
||||||
|
if timeDiff > 100:
|
||||||
|
print('TIMING INDIV ' + boxName + ' 12.6 = ' + str(timeDiff))
|
||||||
bookmarkStr = \
|
bookmarkStr = \
|
||||||
'<a class="imageAnchor" href="/users/' + nickname + '?' + \
|
'<a class="imageAnchor" href="/users/' + nickname + '?' + \
|
||||||
bookmarkLink + '=' + postJsonObject['object']['id'] + \
|
bookmarkLink + '=' + postJsonObject['object']['id'] + \
|
||||||
|
|
Loading…
Reference in New Issue