<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/your-tests-pass-that-s-not-the-bar-for-senior-ios--hhy3ukm7n" -->

---
title: Your Tests Pass. That’s Not the Bar for Senior iOS.
description: Passing tests and hitting 80% coverage isn't the senior iOS bar — choosing which invariants to protect is. Using a rolling-percentile latency recorder as a...
canonical: https://daily.dev/posts/your-tests-pass-that-s-not-the-bar-for-senior-ios--hhy3ukm7n
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Your Tests Pass. That’s Not the Bar for Senior iOS. | daily.dev
og:description: Passing tests and hitting 80% coverage isn't the senior iOS bar — choosing which invariants to protect is. Using a rolling-percentile latency recorder as a...
og:url: https://daily.dev/posts/your-tests-pass-that-s-not-the-bar-for-senior-ios--hhy3ukm7n
og:image: https://api.daily.dev/og/posts/hhy3ukm7n.png
og:image:alt: Your Tests Pass. That’s Not the Bar for Senior iOS.
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Your Tests Pass. That’s Not the Bar for Senior iOS.

**[Medium](https://daily.dev/sources/medium_js)** · 7 min read · 2 upvotes · 0 comments

## Summary

Passing tests and hitting 80% coverage isn't the senior iOS bar — choosing which invariants to protect is. Using a rolling-percentile latency recorder as a concrete example, the post contrasts feature-builders (who verify the happy path) with systems-builders (who encode the failures they're afraid of). Key points: edge cases live at boundaries, the mean is useless for performance work (use p50/p90/p99 via nearest-rank), NaN samples must be dropped before they poison downstream metrics, and performance claims must live inside measure blocks so regressions are caught automatically. The full Swift 6 implementation with 18 tests is available on GitHub.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://medium.com/@er.rajatlakhina/your-tests-pass-thats-not-the-bar-for-senior-ios-5d8d44a00672>

## Questions this post answers

### Why is nearest-rank better than linear interpolation for computing latency percentiles like p99?

Nearest-rank always returns a value that actually occurred in the sample set, rather than an interpolated number that never happened. This makes a reported figure like 'p99 = 214ms' traceable to a real request you can find in a trace tool such as Instruments, and it avoids an entire class of off-by-one interpolation bugs in the percentile calculation.

_When debugging tail latency, daily.dev surfaces practical writeups on percentile measurement choices like this one._

### Why shouldn't I trust average frame time or average latency as a performance metric?

An average hides tail spikes that users actually feel; for example, three requests out of a hundred spiking to 200ms can vanish inside a low overall average while still causing a visible stutter. Reporting p50, p90, and p99 latency percentiles instead surfaces those real outlier requests that the mean conceals.

_For performance engineering debates like mean versus percentile metrics, daily.dev helps developers compare real-world reasoning._

### How should a latency recorder handle a NaN or infinite sample value?

A NaN or infinite measurement should be dropped silently rather than allowed into the buffer, using a guard like `guard sample.isFinite else { return }`, so one bad timing measurement (such as a clock going backwards) cannot poison every percentile computed afterward. This decision is then locked in with a regression test asserting the behavior holds.

_Engineers weighing silent-drop versus surfaced-error handling can find grounded code trade-offs like this on daily.dev._

## Similar posts on daily.dev

- [Beyond the Benchmark: A Metrics-Driven Approach to Sustained iOS Performance on Real Devices](https://daily.dev/posts/beyond-the-benchmark-a-metrics-driven-approach-to-sustained-ios-performance-on-real-devices-lzgk2pnlu) · InfoQ · 1 upvotes · 0 comments
- [Snapshot Testing on iOS: A Setup That Actually Stays Green](https://daily.dev/posts/snapshot-testing-on-ios-a-setup-that-actually-stays-green-wxncwpy3s) · Medium · 0 upvotes · 0 comments
- [Using Cursor to accelerate migration to Swift Testing](https://daily.dev/posts/using-cursor-to-accelerate-migration-to-swift-testing-g8sxhmhrl) · Doordash · 0 upvotes · 0 comments
- [Why 90% Code Coverage Doesn’t Mean Your Tests Are Good](https://daily.dev/posts/why-90-code-coverage-doesn-t-mean-your-tests-are-good-2fwmyd7ne) · SD Times · 0 upvotes · 1 comments

---

Tags: [#testing](https://daily.dev/tags/testing), [#ios](https://daily.dev/tags/ios), [#swift](https://daily.dev/tags/swift)

[View this post on daily.dev](https://daily.dev/posts/your-tests-pass-that-s-not-the-bar-for-senior-ios--hhy3ukm7n)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Your Tests Pass. That’s Not the Bar for Senior iOS.","url":"https://daily.dev/posts/your-tests-pass-that-s-not-the-bar-for-senior-ios--hhy3ukm7n","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/your-tests-pass-that-s-not-the-bar-for-senior-ios--hhy3ukm7n"},"datePublished":"2026-07-12T09:12:34.854Z","dateModified":"2026-09-13T19:38:51.744Z","description":"Passing tests and hitting 80% coverage isn't the senior iOS bar — choosing which invariants to protect is. Using a rolling-percentile latency recorder as a...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/f3bf315db242e8dd0c012fd5d653db3e?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/f3bf315db242e8dd0c012fd5d653db3e?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Medium","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Medium","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/medium","url":"https://daily.dev/sources/medium_js"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/your-tests-pass-that-s-not-the-bar-for-senior-ios--hhy3ukm7n","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"testing,ios,swift","timeRequired":"PT7M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Medium","item":"https://daily.dev/sources/medium_js"},{"@type":"ListItem","position":3,"name":"Your Tests Pass. That’s Not the Bar for Senior iOS."}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/your-tests-pass-that-s-not-the-bar-for-senior-ios--hhy3ukm7n#faq","mainEntity":[{"@type":"Question","name":"Why is nearest-rank better than linear interpolation for computing latency percentiles like p99?","acceptedAnswer":{"@type":"Answer","text":"Nearest-rank always returns a value that actually occurred in the sample set, rather than an interpolated number that never happened. This makes a reported figure like 'p99 = 214ms' traceable to a real request you can find in a trace tool such as Instruments, and it avoids an entire class of off-by-one interpolation bugs in the percentile calculation. When debugging tail latency, daily.dev surfaces practical writeups on percentile measurement choices like this one."}},{"@type":"Question","name":"Why shouldn't I trust average frame time or average latency as a performance metric?","acceptedAnswer":{"@type":"Answer","text":"An average hides tail spikes that users actually feel; for example, three requests out of a hundred spiking to 200ms can vanish inside a low overall average while still causing a visible stutter. Reporting p50, p90, and p99 latency percentiles instead surfaces those real outlier requests that the mean conceals. For performance engineering debates like mean versus percentile metrics, daily.dev helps developers compare real-world reasoning."}},{"@type":"Question","name":"How should a latency recorder handle a NaN or infinite sample value?","acceptedAnswer":{"@type":"Answer","text":"A NaN or infinite measurement should be dropped silently rather than allowed into the buffer, using a guard like `guard sample.isFinite else { return }`, so one bad timing measurement (such as a clock going backwards) cannot poison every percentile computed afterward. This decision is then locked in with a regression test asserting the behavior holds. Engineers weighing silent-drop versus surfaced-error handling can find grounded code trade-offs like this on daily.dev."}}]}
```

