diff options
author | 2024-08-31 08:41:38 +0000 | |
---|---|---|
committer | 2024-08-31 10:41:38 +0200 | |
commit | 0a1555521d8579b6971f408d298b201c8fd59140 (patch) | |
tree | d1179eb3c223c2989d1e6cd088e3da7ec3a5980b /internal/media/manager_test.go | |
parent | [chore] Close copied request body in SignDelivery (#3254) (diff) | |
download | gotosocial-0a1555521d8579b6971f408d298b201c8fd59140.tar.xz |
[performance] use single-threaded image transforms (#3252)
* use single-threaded image resizing in native code so we have more control over goroutines
* implement parallel-free versions of image transform functions also
* remove debug code
Diffstat (limited to 'internal/media/manager_test.go')
-rw-r--r-- | internal/media/manager_test.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/internal/media/manager_test.go b/internal/media/manager_test.go index ff38176f1..29ed95ffa 100644 --- a/internal/media/manager_test.go +++ b/internal/media/manager_test.go @@ -276,7 +276,7 @@ func (suite *ManagerTestSuite) TestSimpleJpegProcess() { suite.Equal("image/jpeg", attachment.Thumbnail.ContentType) suite.Equal(269739, attachment.File.FileSize) suite.Equal(22858, attachment.Thumbnail.FileSize) - suite.Equal("LiBzRk#6V[WF_NvzV@WY_3rqV@a$", attachment.Blurhash) + suite.Equal("LiB|W-#6RQR.~qvzRjWF_3rqV@a$", attachment.Blurhash) // now make sure the attachment is in the database dbAttachment, err := suite.db.GetAttachmentByID(ctx, attachment.ID) @@ -429,7 +429,7 @@ func (suite *ManagerTestSuite) TestSlothVineProcess() { suite.Equal("image/webp", attachment.Thumbnail.ContentType) suite.Equal(312453, attachment.File.FileSize) suite.Equal(5648, attachment.Thumbnail.FileSize) - suite.Equal("LfIYH~xtNskCxtfPW.kB_4aespof", attachment.Blurhash) + suite.Equal("LgIYH}xtNsofxtfPW.j[_4axn+of", attachment.Blurhash) // now make sure the attachment is in the database dbAttachment, err := suite.db.GetAttachmentByID(ctx, attachment.ID) @@ -489,7 +489,7 @@ func (suite *ManagerTestSuite) TestLongerMp4Process() { suite.Equal("image/webp", attachment.Thumbnail.ContentType) suite.Equal(109569, attachment.File.FileSize) suite.Equal(2976, attachment.Thumbnail.FileSize) - suite.Equal("LJQJfm?bM{?b~qRjt7WBayWBofWB", attachment.Blurhash) + suite.Equal("LIQJfl_3IU?b~qM{ofayWBWVofRj", attachment.Blurhash) // now make sure the attachment is in the database dbAttachment, err := suite.db.GetAttachmentByID(ctx, attachment.ID) @@ -549,7 +549,7 @@ func (suite *ManagerTestSuite) TestBirdnestMp4Process() { suite.Equal("image/webp", attachment.Thumbnail.ContentType) suite.Equal(1409625, attachment.File.FileSize) suite.Equal(14478, attachment.Thumbnail.FileSize) - suite.Equal("LJF?FZV@RO.99DM_RPWAx]V?ayMw", attachment.Blurhash) + suite.Equal("LLF$qyaeRO.9DgM_RPaetkV@WCMw", attachment.Blurhash) // now make sure the attachment is in the database dbAttachment, err := suite.db.GetAttachmentByID(ctx, attachment.ID) @@ -657,7 +657,7 @@ func (suite *ManagerTestSuite) TestPngNoAlphaChannelProcess() { suite.Equal("image/jpeg", attachment.Thumbnail.ContentType) suite.Equal(17471, attachment.File.FileSize) suite.Equal(6446, attachment.Thumbnail.FileSize) - suite.Equal("LFQT7e.A%O%4?co$M}M{_1W9~TxV", attachment.Blurhash) + suite.Equal("LGP%YL.A-?tA.9o#RURQ~ojp^~xW", attachment.Blurhash) // now make sure the attachment is in the database dbAttachment, err := suite.db.GetAttachmentByID(ctx, attachment.ID) @@ -713,7 +713,7 @@ func (suite *ManagerTestSuite) TestPngAlphaChannelProcess() { suite.Equal("image/webp", attachment.Thumbnail.ContentType) suite.Equal(18832, attachment.File.FileSize) suite.Equal(3592, attachment.Thumbnail.FileSize) - suite.Equal("LCONII.A%Oxw?co#M}M{_1ac~TxV", attachment.Blurhash) + suite.Equal("LCN^lE.A-?xd?co#N1RQ~ojp~SxW", attachment.Blurhash) // now make sure the attachment is in the database dbAttachment, err := suite.db.GetAttachmentByID(ctx, attachment.ID) @@ -769,7 +769,7 @@ func (suite *ManagerTestSuite) TestSimpleJpegProcessWithCallback() { suite.Equal("image/jpeg", attachment.Thumbnail.ContentType) suite.Equal(269739, attachment.File.FileSize) suite.Equal(22858, attachment.Thumbnail.FileSize) - suite.Equal("LiBzRk#6V[WF_NvzV@WY_3rqV@a$", attachment.Blurhash) + suite.Equal("LiB|W-#6RQR.~qvzRjWF_3rqV@a$", attachment.Blurhash) // now make sure the attachment is in the database dbAttachment, err := suite.db.GetAttachmentByID(ctx, attachment.ID) @@ -847,7 +847,7 @@ func (suite *ManagerTestSuite) TestSimpleJpegProcessWithDiskStorage() { suite.Equal("image/jpeg", attachment.Thumbnail.ContentType) suite.Equal(269739, attachment.File.FileSize) suite.Equal(22858, attachment.Thumbnail.FileSize) - suite.Equal("LiBzRk#6V[WF_NvzV@WY_3rqV@a$", attachment.Blurhash) + suite.Equal("LiB|W-#6RQR.~qvzRjWF_3rqV@a$", attachment.Blurhash) // now make sure the attachment is in the database dbAttachment, err := suite.db.GetAttachmentByID(ctx, attachment.ID) |