benchmarks

package
v1.1.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2026 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Package benchmarks provides API performance benchmarks

Package benchmarks provides federation performance benchmarks

Package benchmarks provides performance benchmarks for critical paths

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BenchmarkBatchActorCreation

func BenchmarkBatchActorCreation(b *testing.B)

BenchmarkBatchActorCreation benchmarks bulk actor creation performance

func BenchmarkConcurrentActorAccess

func BenchmarkConcurrentActorAccess(b *testing.B)

BenchmarkConcurrentActorAccess benchmarks concurrent read/write access to actor data

func BenchmarkSearchPerformance

func BenchmarkSearchPerformance(b *testing.B)

BenchmarkSearchPerformance benchmarks full-text search and filtering operations

func BenchmarkStorageMemoryUsage

func BenchmarkStorageMemoryUsage(b *testing.B)

BenchmarkStorageMemoryUsage benchmarks memory allocation patterns in storage operations

func BenchmarkTimelinePerformance

func BenchmarkTimelinePerformance(b *testing.B)

BenchmarkTimelinePerformance benchmarks timeline query performance under various load conditions

Types

type APIBenchmarkSuite

type APIBenchmarkSuite struct {
	// contains filtered or unexported fields
}

APIBenchmarkSuite provides API endpoint benchmarks

func NewAPIBenchmarkSuite

func NewAPIBenchmarkSuite(handler http.Handler) *APIBenchmarkSuite

NewAPIBenchmarkSuite creates a new API benchmark suite

func (*APIBenchmarkSuite) BenchmarkActivityPubInbox

func (s *APIBenchmarkSuite) BenchmarkActivityPubInbox(b *testing.B)

BenchmarkActivityPubInbox benchmarks ActivityPub inbox

func (*APIBenchmarkSuite) BenchmarkConcurrentRequests

func (s *APIBenchmarkSuite) BenchmarkConcurrentRequests(b *testing.B)

BenchmarkConcurrentRequests benchmarks concurrent API access

func (*APIBenchmarkSuite) BenchmarkCreateStatus

func (s *APIBenchmarkSuite) BenchmarkCreateStatus(b *testing.B)

BenchmarkCreateStatus benchmarks status creation

func (*APIBenchmarkSuite) BenchmarkEndToEndScenario

func (s *APIBenchmarkSuite) BenchmarkEndToEndScenario(b *testing.B)

BenchmarkEndToEndScenario benchmarks a complete user interaction scenario

func (*APIBenchmarkSuite) BenchmarkGetActor

func (s *APIBenchmarkSuite) BenchmarkGetActor(b *testing.B)

BenchmarkGetActor benchmarks actor retrieval endpoint

func (*APIBenchmarkSuite) BenchmarkGetHomeTimeline

func (s *APIBenchmarkSuite) BenchmarkGetHomeTimeline(b *testing.B)

BenchmarkGetHomeTimeline benchmarks timeline retrieval

func (*APIBenchmarkSuite) BenchmarkHealthCheck

func (s *APIBenchmarkSuite) BenchmarkHealthCheck(b *testing.B)

BenchmarkHealthCheck benchmarks the health check endpoint

func (*APIBenchmarkSuite) BenchmarkJSONParsing

func (s *APIBenchmarkSuite) BenchmarkJSONParsing(b *testing.B)

BenchmarkJSONParsing benchmarks JSON parsing performance

func (*APIBenchmarkSuite) BenchmarkMemoryUsage

func (s *APIBenchmarkSuite) BenchmarkMemoryUsage(b *testing.B)

BenchmarkMemoryUsage benchmarks memory usage during API operations

func (*APIBenchmarkSuite) BenchmarkRateLimiting

func (s *APIBenchmarkSuite) BenchmarkRateLimiting(b *testing.B)

BenchmarkRateLimiting benchmarks rate limiting performance

func (*APIBenchmarkSuite) BenchmarkResponseTime

func (s *APIBenchmarkSuite) BenchmarkResponseTime(b *testing.B)

BenchmarkResponseTime benchmarks response time consistency

func (*APIBenchmarkSuite) BenchmarkVerifyCredentials

func (s *APIBenchmarkSuite) BenchmarkVerifyCredentials(b *testing.B)

BenchmarkVerifyCredentials benchmarks credential verification

func (*APIBenchmarkSuite) BenchmarkWebfinger

func (s *APIBenchmarkSuite) BenchmarkWebfinger(b *testing.B)

BenchmarkWebfinger benchmarks WebFinger lookup

func (*APIBenchmarkSuite) Cleanup

func (s *APIBenchmarkSuite) Cleanup()

Cleanup closes the test server

func (*APIBenchmarkSuite) RunAllAPIBenchmarks

func (s *APIBenchmarkSuite) RunAllAPIBenchmarks(b *testing.B)

RunAllAPIBenchmarks runs all API benchmarks

func (*APIBenchmarkSuite) Setup

func (s *APIBenchmarkSuite) Setup(b *testing.B)

Setup prepares test data for API benchmarks

type FederationBenchmarkSuite

type FederationBenchmarkSuite struct {
	// contains filtered or unexported fields
}

FederationBenchmarkSuite provides federation benchmarks

func NewFederationBenchmarkSuite

func NewFederationBenchmarkSuite() *FederationBenchmarkSuite

NewFederationBenchmarkSuite creates a new federation benchmark suite

func (*FederationBenchmarkSuite) BenchmarkActivityDelivery

func (s *FederationBenchmarkSuite) BenchmarkActivityDelivery(b *testing.B)

BenchmarkActivityDelivery benchmarks activity delivery

func (*FederationBenchmarkSuite) BenchmarkActivityValidation

func (s *FederationBenchmarkSuite) BenchmarkActivityValidation(b *testing.B)

BenchmarkActivityValidation benchmarks ActivityPub activity validation

func (*FederationBenchmarkSuite) BenchmarkActorResolution

func (s *FederationBenchmarkSuite) BenchmarkActorResolution(b *testing.B)

BenchmarkActorResolution benchmarks remote actor resolution

func (*FederationBenchmarkSuite) BenchmarkBatchActivityProcessing

func (s *FederationBenchmarkSuite) BenchmarkBatchActivityProcessing(b *testing.B)

BenchmarkBatchActivityProcessing benchmarks processing multiple activities

func (*FederationBenchmarkSuite) BenchmarkConcurrentFederation

func (s *FederationBenchmarkSuite) BenchmarkConcurrentFederation(b *testing.B)

BenchmarkConcurrentFederation benchmarks concurrent federation operations

func (*FederationBenchmarkSuite) BenchmarkFederationCaching

func (s *FederationBenchmarkSuite) BenchmarkFederationCaching(b *testing.B)

BenchmarkFederationCaching benchmarks federation data caching

func (*FederationBenchmarkSuite) BenchmarkHTTPSignatureVerification

func (s *FederationBenchmarkSuite) BenchmarkHTTPSignatureVerification(b *testing.B)

BenchmarkHTTPSignatureVerification benchmarks HTTP signature verification

func (*FederationBenchmarkSuite) BenchmarkInboxProcessing

func (s *FederationBenchmarkSuite) BenchmarkInboxProcessing(b *testing.B)

BenchmarkInboxProcessing benchmarks inbox activity processing

func (*FederationBenchmarkSuite) BenchmarkRemoteInstanceDiscovery

func (s *FederationBenchmarkSuite) BenchmarkRemoteInstanceDiscovery(b *testing.B)

BenchmarkRemoteInstanceDiscovery benchmarks discovering remote instances

func (*FederationBenchmarkSuite) BenchmarkWebfingerLookup

func (s *FederationBenchmarkSuite) BenchmarkWebfingerLookup(b *testing.B)

BenchmarkWebfingerLookup benchmarks WebFinger lookups

func (*FederationBenchmarkSuite) RunAllFederationBenchmarks

func (s *FederationBenchmarkSuite) RunAllFederationBenchmarks(b *testing.B)

RunAllFederationBenchmarks runs all federation benchmarks

func (*FederationBenchmarkSuite) Setup

func (s *FederationBenchmarkSuite) Setup(_ *testing.B)

Setup prepares test data for federation benchmarks Note: b parameter is used for reporting allocation stats during setup

type StorageBenchmarkSuite

type StorageBenchmarkSuite struct {
	// contains filtered or unexported fields
}

StorageBenchmarkSuite provides storage operation benchmarks

func NewStorageBenchmarkSuite

func NewStorageBenchmarkSuite(storage *mocks.EnhancedMockStorage) *StorageBenchmarkSuite

NewStorageBenchmarkSuite creates a new storage benchmark suite

func (*StorageBenchmarkSuite) BenchmarkCreateActor

func (s *StorageBenchmarkSuite) BenchmarkCreateActor(b *testing.B)

BenchmarkCreateActor benchmarks actor creation

func (*StorageBenchmarkSuite) BenchmarkFollowActor

func (s *StorageBenchmarkSuite) BenchmarkFollowActor(b *testing.B)

BenchmarkFollowActor benchmarks following relationships

func (*StorageBenchmarkSuite) BenchmarkGetActivity

func (s *StorageBenchmarkSuite) BenchmarkGetActivity(b *testing.B)

BenchmarkGetActivity benchmarks activity retrieval

func (*StorageBenchmarkSuite) BenchmarkGetActor

func (s *StorageBenchmarkSuite) BenchmarkGetActor(b *testing.B)

BenchmarkGetActor benchmarks actor retrieval

func (*StorageBenchmarkSuite) BenchmarkGetTimeline

func (s *StorageBenchmarkSuite) BenchmarkGetTimeline(b *testing.B)

BenchmarkGetTimeline benchmarks timeline retrieval

func (*StorageBenchmarkSuite) BenchmarkStoreActivity

func (s *StorageBenchmarkSuite) BenchmarkStoreActivity(b *testing.B)

BenchmarkStoreActivity benchmarks activity storage

func (*StorageBenchmarkSuite) RunAllBenchmarks

func (s *StorageBenchmarkSuite) RunAllBenchmarks(b *testing.B)

RunAllBenchmarks runs all storage benchmarks

func (*StorageBenchmarkSuite) Setup

func (s *StorageBenchmarkSuite) Setup(b *testing.B)

Setup prepares test data for benchmarks

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL