Reputation: 21
Is there any way to find the individual feed size in azure artifacts in azure devops? Using any kind of api call or any other way.
Microsoft is changing the lisencing for azure artifacts, I would wanna know which feed is taking up the most space, so I can take suitable steps to take care of this.
I've tried the feed management api to get the details of the feeds, but unfortunately that api doesn't display the size.
Upvotes: 1
Views: 1520
Reputation: 762
The suggestion ticket has been closed:
To see the feed size:
Then you can see the storage size of your feeds.
Upvotes: 2
Reputation: 21
Use this in tfs database if you use Azure Devops Server.
select
[f].FeedName,
sum(cast([list].BlockFileLength as decimal(38)))/1024.0/1024.0 AS SizeInMb
from
BlobStore.tbl_Blob [blob]
join BlobStore.tbl_BlockList [list] on [list].BlobId = [blob].BlobId
join [Feed].[tbl_PackageVersionIndex] [fd] on '0x'+[fd].StorageId = CONVERT(varchar(max),blob.BlobId ,1)
join [Feed].[tbl_Feed] [f] on [fd].FeedId = [f].FeedId
join [Feed].[tbl_PackageIndex] [p] on [p].PackageId = [fd].PackageId
group by
[f].FeedName
order by
SizeInMb desc
select
[f].FeedName,
[p].PackageName,
sum(cast([list].BlockFileLength as decimal(38)))/1024.0/1024.0 AS SizeInMb,
(select count(pvi.PackageVersionId) from [Feed].[tbl_PackageVersionIndex] [pvi]
where pvi.FeedId = f.FeedId and pvi.PackageId = p.PackageId) as Versions
from
BlobStore.tbl_Blob [blob]
join BlobStore.tbl_BlockList [list] on [list].BlobId = [blob].BlobId
join [Feed].[tbl_PackageVersionIndex] [fd] on '0x'+[fd].StorageId = CONVERT(varchar(max),blob.BlobId ,1)
join [Feed].[tbl_Feed] [f] on [fd].FeedId = [f].FeedId
join [Feed].[tbl_PackageIndex] [p] on [p].PackageId = [fd].PackageId
group by
[f].FeedName,
[p].PackageName,
f.FeedId,
p.PackageId
order by SizeInMb desc
Upvotes: 2
Reputation: 19491
At the moment ,there is no directly way to get the size of the feed, either from the UI or the rest api. This feature is currently not supported in azure devops.
As an inconvenient method, you can get the size of each package through the download option, and then you can add the size of these packages to get the size of the feed.
I created a feature suggestion ticket for you on our Developer Community form , which is our main forum for product suggestions. You can comment and vote there to increase priority.
Upvotes: 1