- Refactored notification provider tests to use Discord webhook URLs. - Updated frontend forms and API interactions to restrict provider type to Discord. - Modified translations to reflect the change in supported provider types. - Enhanced UI to indicate deprecated status for non-Discord providers. - Adjusted documentation to align with the new provider structure.
23 lines
355 B
Go
23 lines
355 B
Go
package services
|
|
|
|
import (
|
|
"testing"
|
|
"time"
|
|
)
|
|
|
|
func BenchmarkFormatDuration(b *testing.B) {
|
|
d := 3665 * time.Second
|
|
b.ResetTimer()
|
|
for i := 0; i < b.N; i++ {
|
|
formatDuration(d)
|
|
}
|
|
}
|
|
|
|
func BenchmarkExtractPort(b *testing.B) {
|
|
url := "https://discord.com/api/webhooks/123/abc:8080"
|
|
b.ResetTimer()
|
|
for i := 0; i < b.N; i++ {
|
|
extractPort(url)
|
|
}
|
|
}
|