Nikasa, home Request an invite
DocsThe sample report

The sample report

The real report nk demo prints on release 0.3.13, on Nikasa's own small shop app, and how its count of 13 changes comes down to three causes.

On this page

This page shows the report that nk demo printed on release 0.3.13, on a run made for this page, and how its count of 13 changes comes down to three causes.

The page leaves out the last two blocks of the report:

  • the provenance, which names the exact images and files compared;
  • a short note on what to try next.

Three causes, 13 changes #

The new build did three things. The report counts each place and value that moved, so one cause can be several changes:

Cause Where to look Changes counted
A field renamed from total to total_cents The SHAPE lines 8: one gone and one new, for each of the two order totals, in each of the two places they show
A call to a fraud check service, for each order placed The now calls lines 1: the new call, seen in two requests
A query for each order, in the request that lists orders The calls per request line 4: the old query gone and three new ones

Those are the 8 in responses and the 5 in calls during requests that the first line adds up. No response shows the last two causes.

listed in brief as 7 lines means the SHAPE, NEW and GONE lines that tell them.

How the 8 adds up #

Nikasa counts one change for each kind, place and value:

  1. The two orders' totals are 4800 and 600.
  2. Each shows in two places: the answer for one order (/response/body) and the list of orders (/response/body/[*]).
  3. In each place, each total is one total gone and one total_cents new. That makes 8.

A SHAPE line tells a rename once per place and prints the first value it met, so 600 does not appear below.

The report #

output
13 changes in responses and requests (8 in responses, 5 in calls during requests), listed in brief as 7 lines
learned from 8 runs: 314 values fixed, 5 varying, 2 sometimes present, 0 links
checked 4 runs of the new build
confirming: 13 changes were about to be counted, so 2 more new runs were made and every area was decided again, counting only what all 4 new runs showed and none of the 8 old runs did: in responses 8 -> 8, in calls during requests 5 -> 5; none left the count

SHAPE  /response/body  1 field added: total_cents 4800; 1 removed: total
       3 scenarios: 0000 POST /api/orders, 0001 POST /api/orders, 0002 GET /api/orders/1
SHAPE  /response/body/[*]  1 field added: total_cents 4800; 1 removed: total
       1 scenario: 0003 GET /api/orders

in short:
  now calls, in 0000 POST /api/orders: app -> fraud-check:8000
  now calls, in 0001 POST /api/orders: app -> fraud-check:8000
  calls per request, 0003 GET /api/orders: 5 calls to postgres:5432, was 1 ("SELECT customer FROM orders WHERE id = $1" ran 2 times, and 1 more)

NEW    /calls/app -> fraud-check:8000  {POST /check: [{request: {body: {customer: string}, headers: {accept-encoding: string, content-type: string, host: string, user-agent: string}, method: string, path: [string], query: {}}, response: {b...
       2 scenarios: 0000 POST /api/orders, 0001 POST /api/orders
NEW    /calls/app -> postgres:5432/"SELECT customer FROM orders WHERE id = $1"  [{outcome: string, params: [string], rows: [[string]]}]
       1 scenario: 0003 GET /api/orders
NEW    /calls/app -> postgres:5432/"SELECT id FROM orders ORDER BY id"  [{"params":[],"rows":[["1"],["2"]],"outcome":"SELECT 2"}]
       1 scenario: 0003 GET /api/orders
GONE   /calls/app -> postgres:5432/"SELECT o.id, o.customer, p.name, l.quantity, p.price_cents FROM orders o JOIN order_lines l ON l.ord..."  [{outcome: string, params: [], rows: [[string]]}]
       1 scenario: 0003 GET /api/orders
NEW    /calls/app -> postgres:5432/"SELECT p.name, l.quantity, p.price_cents FROM order_lines l JOIN products p ON p.id = l.product_id W..."  [{outcome: string, params: [string], rows: [[string]]}]
       1 scenario: 0003 GET /api/orders

driver made 5 requests: 200 x3, 201 x2
requests lined up by what was sent: every run made 5 requests in 5 steps
requests exercised 4 endpoints; with no API description Nikasa cannot list what they missed (--openapi)
coverage: what this compare looked at and could not see is told at the end

The first lines say how sure it is. All 8 runs of the old build agreed on what it counted, and all 4 runs of the new build showed it. Reading the report explains every part.

What it looked at #

The report then says what the compare looked at, which is how you judge a quiet report:

output
coverage: what this compare looked at
  starting state: fresh install: no golden and no --start-migrated, so each run starts from what the compose file gives
  start check: app by its own health check; fraud-check by its own health check; postgres by its own health check
  services: app, fraud-check, postgres; received no traffic Nikasa saw: none
  protocols: http (the driver's requests; app -> fraud-check:8000), postgres (app -> postgres:5432); WebSocket upgrade: not seen
  driver: HTTP requests only, no browser driven: 5 requests, user agent sent: hurl/7.1.0, from ghcr.io/orange-opensource/hurl:7.1.0
  files: each service's own filesystem compared (app, fraud-check, postgres) by the paths added, changed or deleted by the end of the run; file reads and writes during the run: not recorded; mounts not compared, besides those of a database server Nikasa recognises: none listed
  tls: key settings: app none, fraud-check none, postgres none; eBPF: not run; left encrypted: none
  image user: each service runs as its image's own user, not recorded by this build
  masked by nk: known credential names and shapes, 0 values; nothing else
  api description: none found in either build's runs (--openapi gives one); of the 50 paths the new build's first run asked, not there (404): 50

In starting state, golden is a saved starting database, and neither it nor --start-migrated was used here. See Start from real data.

Next steps #

Written for nk 0.3.14. Something wrong or unclear? Write to hello@nikasa.dev.