LSLínguas Sem BenaventeInglês para brasileiros

Aula

Performance B1

Nível: B1

Objetivo

Descrever problemas de performance em inglês, identificar gargalos, comparar métricas antes e depois de uma mudança e propor otimizações em uma equipe de engenharia.

Explicação

Em discussões técnicas de performance, alguns termos aparecem o tempo todo: response time (tempo de resposta), latency (latência), throughput (vazão), memory usage (uso de memória RAM) e CPU usage (uso de processador). Bottleneck é o gargalo, o ponto mais lento que limita todo o resto. Optimization é a otimização, a mudança que melhora o desempenho.

Para descrever um problema, combine o sintoma com o número medido: `The endpoint is slow. The average response time is 1.4 seconds.`, `CPU usage spiked to 95% during peak hours.`, `Memory usage keeps growing and the service restarts every hour.` Use spike para um pico súbito e keep growing para algo que sobe de forma contínua.

Para comparar antes e depois de uma mudança, use padrões como `Response time dropped from 1.4s to 90ms.`, `CPU usage went down from 85% to 40%.`, `Throughput doubled after we added the index.` Verbos úteis: drop (cair), improve (melhorar), double (dobrar), cut (reduzir), spike (picar).

Para propor uma melhoria, use should + verbo, could + verbo, ou `We can + verbo`: `We should add an index on the user_id column.`, `We could cache the result for 60 seconds.`, `We can move this query to a background job.` Termos comuns: index (índice de banco), cache (cache), query (consulta SQL), full table scan (varredura completa da tabela), background job (tarefa em segundo plano).

Em uma reunião, organize a fala em três blocos: (1) sintoma e métrica, (2) causa raiz ou bottleneck, (3) proposta de otimização. Isso ajuda a equipe a entender o problema e a decidir rápido.

Exemplos

InglêsTraduçãoObservação
The endpoint is slow. The average response time is 1.4 seconds.O endpoint está lento. O tempo médio de resposta é 1,4 segundos.Sintoma seguido de métrica medida.
CPU usage spiked to 95% during peak hours.O uso de CPU subiu de repente para 95% nas horas de pico.Spike = pico súbito.
The bottleneck is a missing index on the user_id column.O gargalo é a falta de um índice na coluna user_id.Bottleneck = gargalo; missing index = índice ausente.
Memory usage keeps growing and the service restarts every hour.O uso de memória continua crescendo e o serviço reinicia a cada hora.Keep + gerúndio indica ação contínua.
After we added the index, response time dropped from 1.4s to 90ms.Depois que adicionamos o índice, o tempo de resposta caiu de 1,4s para 90ms.Dropped from X to Y = caiu de X para Y.
We could cache the result for 60 seconds to avoid repeated database calls.Poderíamos cachear o resultado por 60 segundos para evitar chamadas repetidas ao banco.Could + verbo para propor uma melhoria.

Erros comuns

  • Confundir memory usage com disk space: memory é RAM volátil; disk é armazenamento permanente.
  • Usar `perform` como substantivo. O substantivo é `performance`; o verbo é `perform`.
  • Dizer `the CPU was using 95%`. O padrão natural é `CPU usage was 95%` ou `the CPU was at 95%`.
  • Traduzir "gargalo" como `throat` ou `bottleneck of the bottle`. O termo técnico é simplesmente `bottleneck`.
  • Confundir `response time` com `execution time`. Response time inclui espera em fila; execution time é só o processamento.
  • Escrever `the response time improved in 80%`. O padrão correto é `improved by 80%` ou `dropped by 80%`.

Prática guiada

Reescreva cada bloco em uma frase completa, juntando sintoma, métrica e causa:

  • Sintoma: `slow request.`
  • Métrica: `response time = 1.4s.` Frase: `The request is slow. Response time is 1.4 seconds.`

  • Antes: `response time = 1.4s.`
  • Depois: `response time = 90ms.` Frase: `Response time dropped from 1.4 seconds to 90 milliseconds.`

  • Problema: `full table scan.`
  • Solução: `add an index on user_id.` Frase: `We should add an index on the user_id column to avoid the full table scan.`

Repare no uso de `dropped from X to Y` para comparar e em `should` + verbo para propor.

Resumo

Para descrever performance, combine sintoma com métrica: response time, CPU usage, memory usage, latency, throughput. Bottleneck é o ponto que limita o sistema. Para comparar antes e depois, use dropped from X to Y, improved by X%, doubled, went down. Para propor otimização, use should, could ou we can, com termos como index, cache, query, full table scan, background job.

Vocabulário

Palavras principais

18 itens
performancedesempenho, performance

The team is focused on performance this quarter.

A equipe está focada em performance neste trimestre.
slow requestrequisição lenta

We received several reports about a slow request on the search endpoint.

Recebemos vários relatos sobre uma requisição lenta no endpoint de busca.
response timetempo de resposta

Average response time went down from 1.2s to 300ms.

O tempo médio de resposta caiu de 1,2s para 300ms.
latencylatência

Latency is higher for users far from the data center.

A latência é maior para usuários longe do data center.
throughputvazão (requisições por segundo)

The new worker doubled our throughput.

O novo worker dobrou nossa vazão.
CPU usageuso de CPU

CPU usage spiked to 95% during peak hours.

O uso de CPU subiu para 95% nas horas de pico.
memory usageuso de memória

Memory usage keeps growing until the service restarts.

O uso de memória continua crescendo até o serviço reiniciar.
bottleneckgargalo

The database query is the bottleneck.

A consulta ao banco é o gargalo.
optimizationotimização

The optimization cut response time by 80%.

A otimização reduziu o tempo de resposta em 80%.
optimizeotimizar

We optimized the query by adding an index.

Otimizamos a consulta adicionando um índice.
spikepico súbito

Latency spiked after the deployment.

A latência disparou depois do deploy.
peak hourshorário de pico

Errors are more common during peak hours.

Erros são mais comuns no horário de pico.
loadcarga

The service handled a load of 5,000 requests per second.

O serviço suportou uma carga de 5.000 requisições por segundo.
queryconsulta (banco de dados)

The slow query runs against the orders table.

A consulta lenta roda na tabela de pedidos.
full table scanvarredura completa da tabela

Without an index, the database does a full table scan.

Sem um índice, o banco faz uma varredura completa da tabela.
indexíndice (de banco de dados)

We added an index on the user_id column.

Adicionamos um índice na coluna user_id.
cachecache / armazenar em cache

We can cache the result for 60 seconds.

Podemos cachear o resultado por 60 segundos.
profileperfilar, analisar o desempenho

Let's profile the service to find the slow function.

Vamos perfilar o serviço para achar a função lenta.

História

História: Performance B1

Nível: B1

História em inglês

The slow search

On Monday morning, the on-call engineer Maya received several pages about a slow request on the search endpoint. Average response time was 1.4 seconds, and CPU usage spiked to 92% during peak hours. Users complained that the page took too long to load. Maya opened the dashboard and confirmed that the slow request matched the same endpoint in every report.

Finding the bottleneck

She profiled the service and saw that most of the time was spent in a single database query. The query searched the orders table by user_id, and the database did a full table scan on every call. That query was clearly the bottleneck of the endpoint. Memory usage was stable, so the problem was not a leak. Latency was high, but only for this endpoint, which pointed to a database issue rather than the network.

The fix and the new baseline

Maya added an index on the user_id column of the orders table and deployed the change. After the deploy, response time dropped from 1.4 seconds to 90 milliseconds. CPU usage went down from 92% to 35%, and throughput doubled. She benchmarked the new version against the previous release and saved the numbers as the new baseline. In the post-incident review, she proposed two more optimizations: cache the result for 60 seconds and move the heavy report to a background job.

Tradução linha por linha

InglêsTradução
On Monday morning, the on-call engineer Maya received several pages about a slow request on the search endpoint.Na segunda de manhã, a engenheira de plantão Maya recebeu várias páginas sobre uma requisição lenta no endpoint de busca.
Average response time was 1.4 seconds, and CPU usage spiked to 92% during peak hours.O tempo médio de resposta era 1,4 segundo, e o uso de CPU subiu para 92% nas horas de pico.
Users complained that the page took too long to load.Os usuários reclamaram que a página demorava demais para carregar.
Maya opened the dashboard and confirmed that the slow request matched the same endpoint in every report.Maya abriu o painel e confirmou que a requisição lenta correspondia ao mesmo endpoint em todos os relatos.
She profiled the service and saw that most of the time was spent in a single database query.Ela perfilou o serviço e viu que a maior parte do tempo era gasta em uma única consulta ao banco.
The query searched the orders table by user_id, and the database did a full table scan on every call.A consulta buscava na tabela de pedidos por user_id, e o banco fazia uma varredura completa a cada chamada.
That query was clearly the bottleneck of the endpoint.Essa consulta era claramente o gargalo do endpoint.
Memory usage was stable, so the problem was not a leak.O uso de memória estava estável, então o problema não era um vazamento.
Latency was high, but only for this endpoint, which pointed to a database issue rather than the network.A latência estava alta, mas só para esse endpoint, o que apontava para um problema de banco, não de rede.
Maya added an index on the user_id column of the orders table and deployed the change.Maya adicionou um índice na coluna user_id da tabela de pedidos e fez o deploy da mudança.
After the deploy, response time dropped from 1.4 seconds to 90 milliseconds.Depois do deploy, o tempo de resposta caiu de 1,4 segundo para 90 milissegundos.
CPU usage went down from 92% to 35%, and throughput doubled.O uso de CPU caiu de 92% para 35%, e a vazão dobrou.
She benchmarked the new version against the previous release and saved the numbers as the new baseline.Ela comparou a nova versão com o release anterior em um benchmark e salvou os números como a nova linha de base.
In the post-incident review, she proposed two more optimizations: cache the result for 60 seconds and move the heavy report to a background job.Na retrospectiva do incidente, ela propôs mais duas otimizações: cachear o resultado por 60 segundos e mover o relatório pesado para uma tarefa em segundo plano.

Notas de vocabulário

  • slow request = requisição lenta; o sintoma que abre a investigação.
  • response time = tempo de resposta; métrica central em 1.4 seconds / 90ms.
  • CPU usage = uso de CPU; métrica que caiu de 92% para 35%.
  • peak hours = horário de pico; momento em que a carga é maior.
  • profile = perfilar, ou seja, medir o desempenho para localizar o gargalo.
  • bottleneck = gargalo; neste caso, a query que fazia full table scan.
  • full table scan = varredura completa da tabela; comum quando falta índice.
  • index = índice de banco; a solução que Maya aplicou.
  • latency = latência; aqui ajudou a descartar problema de rede.
  • throughput = vazão; dobrou depois do fix.
  • baseline = linha de base; referência para comparações futuras.
  • background job = tarefa em segundo plano; otimização proposta por Maya.

Perguntas de compreensão

  1. What problem did the users report on Monday morning?
  2. What was the average response time before the fix?
  3. What did Maya identify as the bottleneck?
  4. Why did the database do a full table scan on every call?
  5. What evidence showed that the problem was not a memory leak?
  6. How did the new metrics compare to the old ones after the deploy?
  7. What two further optimizations did Maya propose?

Prática com a história

  1. Reescreva em tom de relatório: The endpoint got faster after the deploy.
  2. Traduza: O gargalo era a falta de um índice na coluna user_id.
  3. Proponha uma frase com should para melhorar a query da história.
  4. Complete: After the optimization, CPU usage went ___ 92% ___ 35%.

Prática

Exercícios e teste

Próxima etapa
9blocos de exercícios disponíveis neste tema
11questões de teste para revisar depois da aula

A próxima melhoria é transformar esses arquivos em perguntas com resposta no navegador. Por enquanto, esta página já organiza o estudo e permite seguir a aula inteira sem abrir os arquivos manualmente.