Codebergdnkl

foot

master
ply5 git calls1.2 s29 KiB2 cachedprotocol v2
87 lines3.3 KiBRaw
1#pragma once
3#include <stdbool.h>
4#include <wayland-client.h>
6#include "terminal.h"
8extern const struct wl_data_device_listener data_device_listener;
9extern const struct zwp_primary_selection_device_v1_listener primary_selection_device_listener;
11void selection_start(
12 struct terminal *term, int col, int row,
13 enum selection_kind new_kind, bool spaces_only);
14void selection_update(struct terminal *term, int col, int row);
15void selection_finalize(
16 struct seat *seat, struct terminal *term, uint32_t serial);
17void selection_dirty_cells(struct terminal *term);
18void selection_cancel(struct terminal *term);
19void selection_extend(
20 struct seat *seat, struct terminal *term,
21 int col, int row, enum selection_kind kind);
23bool selection_on_rows(const struct terminal *term, int start, int end);
25void selection_scroll_up(struct terminal *term, int rows);
26void selection_scroll_down(struct terminal *term, int rows);
27void selection_view_up(struct terminal *term, int new_view);
28void selection_view_down(struct terminal *term, int new_view);
30void selection_clipboard_unset(struct seat *seat);
31void selection_primary_unset(struct seat *seat);
33bool selection_clipboard_has_data(const struct seat *seat);
34bool selection_primary_has_data(const struct seat *seat);
36char *selection_to_text(const struct terminal *term);
37void selection_to_clipboard(
38 struct seat *seat, struct terminal *term, uint32_t serial);
39void selection_from_clipboard(
40 struct seat *seat, struct terminal *term, uint32_t serial);
41void selection_to_primary(
42 struct seat *seat, struct terminal *term, uint32_t serial);
43void selection_from_primary(struct seat *seat, struct terminal *term);
45/* Copy text *to* primary/clipboard */
46bool text_to_clipboard(
47 struct seat *seat, struct terminal *term, char *text, uint32_t serial);
48bool text_to_primary(
49 struct seat *seat, struct terminal *term, char *text, uint32_t serial);
51/*
52 * Copy text *from* primary/clipboard
53 *
54 * Note that these are asynchronous; they *will* return
55 * immediately. The 'cb' callback will be called 0..n times with
56 * clipboard data. When done (or on error), the 'done' callback is
57 * called.
58 *
59 * As such, keep this in mind:
60 * - The 'user' context must not be stack allocated
61 * - Don't expect clipboard data to have been received when these
62 * functions return (it will *never* have been received at this
63 * point).
64 */
65void text_from_clipboard(
66 struct seat *seat, struct terminal *term, bool no_strip,
67 void (*cb)(char *data, size_t size, void *user),
68 void (*done)(void *user), void *user);
70void text_from_primary(
71 struct seat *seat, struct terminal *term, bool no_strip,
72 void (*cb)(char *data, size_t size, void *user),
73 void (*dont)(void *user), void *user);
75void selection_start_scroll_timer(
76 struct terminal *term, int interval_ns,
77 enum selection_scroll_direction direction, int col);
78void selection_stop_scroll_timer(struct terminal *term);
80void selection_find_word_boundary_left(
81 const struct terminal *term, struct coord *pos, bool spaces_only);
82void selection_find_word_boundary_right(
83 const struct terminal *term, struct coord *pos, bool spaces_only,
84 bool stop_on_space_to_word_boundary);
86struct coord selection_get_start(const struct terminal *term);
87struct coord selection_get_end(const struct terminal *term);
Diagnostics5 git calls · 1.2 s
CallStatusSizeTime01.2 s
discover200178 B3 ms
git.upload-pack discover
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=3
git.response.bytes=178
git.server.agent=git/2.56.1-Linux
git.server.object_format=sha1
git.server.caps=agent ls-refs fetch server-option object-format
git.server.fetch=shallow wait-for-done filter
git.protocol.version=2
git.pkt.frames=9
git.pkt.data=7
git.pkt.flush=2
git.pkt.delim=0
git.pkt.bytes=178
git.pkt.payload.max=35
ls-refs20010 KiB541 ms
git.upload-pack ls-refs
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=541
git.response.bytes=10322
git.response.cache=EXPIRED
git.response.duration_ms=541
git.protocol.version=2
git.pkt.frames=108
git.pkt.data=107
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=10322
git.pkt.payload.max=106
git.ls_refs.count=107
git.ls_refs.head=refs/heads/master
fetchcombine:blob:none+tree:2 · deepen 12008.6 KiB · hit2 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=2
git.response.bytes=8830
git.response.cache=HIT
git.response.duration_ms=2
git.fetch.filter=combine:blob:none+tree:2
git.fetch.wants=c0d2c3e95d74cb60526ff28aec9f34ee3df545e0
git.fetch.haves.count=0
git.fetch.deepen=1
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=7
git.pkt.data=5
git.pkt.flush=1
git.pkt.delim=1
git.pkt.bytes=8830
git.pkt.payload.max=8730
git.sideband.band1.bytes=8730
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=14
git.pack.bytes=8730
git.fetch.wide.objects=14
git.fetch.wide.extra_bytes=9909
git.fetch.wide.blobs=0
fetchtree:0 · deepen 102009.3 KiB · hit2 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=2
git.response.bytes=9489
git.response.cache=HIT
git.response.duration_ms=2
git.fetch.filter=tree:0
git.fetch.wants=c0d2c3e95d74cb60526ff28aec9f34ee3df545e0
git.fetch.haves.count=0
git.fetch.deepen=10
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=7
git.pkt.data=5
git.pkt.flush=1
git.pkt.delim=1
git.pkt.bytes=9489
git.pkt.payload.max=9389
git.sideband.band1.bytes=9389
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=10
git.pack.bytes=9389
git.pack.ofs_delta=0
git.pack.ref_delta=0
git.pack.chain.max=0
git.pack.trailer=de930681b6073ba5b599a0f956bfbd114762ad5a
git.pack.full=10
Open pack map
fetch200934 B626 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=626
git.response.bytes=934
git.response.cache=MISS
git.response.duration_ms=626
git.fetch.wants=b6ad099ad47c36d3e4bbe5dc64a11bd0f2e20111
git.fetch.haves.count=0
git.fetch.deepen=0
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=4
git.pkt.data=3
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=934
git.pkt.payload.max=907
git.sideband.band1.bytes=907
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0

Each row is one HTTP round trip ply made to the git server for this page, on one timeline. discover asks what the server speaks, ls-refs lists branch tips, fetch brings objects by id. A hit was served by Workers Cache. Tap a row for its wire details.

Remote
https://codeberg.org/dnkl/foot
Ref
refs/heads/master
Commit
c0d2c3e95d74cb60526ff28aec9f34ee3df545e0
cf-ray
a5e20999eb7ec69c
Request
401883d5…
Protocol
v2 · sha1
Agent
git/2.56.1-Linux
Filter
advertised
Fetch
shallow wait-for-done filter
Capabilities
agent ls-refs fetch server-option object-format