[ 
https://issues.apache.org/jira/browse/OAK-3806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15068265#comment-15068265
 ] 

Chetan Mehrotra commented on OAK-3806:
--------------------------------------

{quote}
> //TODO FIXME Need to determine the blob length from id.
Actually, you already know the length from the CountingInputStream 
(cin.getCount()), so the comment seems unnecessary.
{quote}

Yeah comment bit stale. What I wanted to do was avoid use of 
CountingInputStream as in AbstractBlobStore the length is "encoded" in id 
itself so can be determined in fast manner

bq. getUploadTimeInSecs is there but getDownloadTimeInSecs is missing

Yes that got missed. Would add that

+1 to proposed method names. Would do that

{quote}
> //Download time might not be accurate as reading code might
> //be processing also as it moved further in stream.

This could be solved, you would need to measure each read operation separately. 
It would be some overhead, but if wrapped with a BufferedInputStream then it 
wouldn't be all that bad.
{quote}
Can be done but then I think it would add decent overhead with calls to 
System.nanoTime(). For now lets keep it simple

bq. This could be avoided if the "wrapping order" is switched: wrap the 
CountingInputStream within a BufferedInputStream. I see it could mean double 
buffering: BufferedInputStream(CountingInputStream(BufferedInputStream(in))). 
Maybe this can be avoided.

Can be done. But its fine to comment that test. Would like to avoid unnecessary 
buffering. 


> Collect and expose statistics related to BlobStore operations
> -------------------------------------------------------------
>
>                 Key: OAK-3806
>                 URL: https://issues.apache.org/jira/browse/OAK-3806
>             Project: Jackrabbit Oak
>          Issue Type: New Feature
>          Components: blob
>            Reporter: Chetan Mehrotra
>            Assignee: Chetan Mehrotra
>             Fix For: 1.3.13
>
>         Attachments: OAK-3806-v1.patch, OAK-3806-v2.patch, 
> blob-store-stats.png, blob-upload.png
>
>
> It would be useful to collect some statistics around BlobStore operations 
> like upload size, download size, how frequent uploads are done etc
> It should support following features
> * Collection across various implementation - For most cases just collecting 
> stats in {{DataStoreBlobStore}} and {{AbstractBlobStore}} should be sufficient
> * Collected stats should be exposed over JMX
> *Goals*
> # What are the number/size of downloads and uploads over period of time - The 
> time series data would help us understand any hot usage time
> # Are there too many repeated download for few blobIds - Later we can use 
> this information to cache such binary content locally and avoid hitting 
> remote stores (specially useful for RDB/Mongo-BlobStore)
> # What is the typical upload and download rate provided by the BlobStore - 
> Using this we can see if it varies, if its too low for Oak operational needs 
> etc



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to