Artifactspublic-v0

curl

master
ply4 git calls29 ms289 KiB3 cachedprotocol v2
135 lines4.8 KiBRaw
1#***************************************************************************
2# _ _ ____ _
3# Project ___| | | | _ \| |
4# / __| | | | |_) | |
5# | (__| |_| | _ <| |___
6# \___|\___/|_| \_\_____|
7#
8# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
9#
10# This software is licensed as described in the file COPYING, which
11# you should have received as part of this distribution. The terms
12# are also available at https://curl.se/docs/copyright.html.
14# You may opt to use, copy, modify, merge, publish, distribute and/or sell
15# copies of the Software, and permit persons to whom the Software is
16# furnished to do so, under the terms of the COPYING file.
18# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19# KIND, either express or implied.
21# SPDX-License-Identifier: curl
23###########################################################################
24# Find the zstd library
26# Input variables:
28# - `ZSTD_INCLUDE_DIR`: Absolute path to zstd include directory.
29# - `ZSTD_LIBRARY`: Absolute path to `zstd` library.
30# - `ZSTD_USE_STATIC_LIBS`: Configure for static zstd libraries.
32# Defines:
34# - `ZSTD_FOUND`: System has zstd.
35# - `ZSTD_VERSION`: Version of zstd.
36# - `CURL::zstd`: zstd library target.
38set(_zstd_pc_requires "libzstd")
40if(NOT DEFINED ZSTD_INCLUDE_DIR AND
41 NOT DEFINED ZSTD_LIBRARY)
42 if(CURL_USE_PKGCONFIG)
43 find_package(PkgConfig QUIET)
44 pkg_check_modules(_zstd ${_zstd_pc_requires})
45 endif()
46 if(NOT _zstd_FOUND AND CURL_USE_CMAKECONFIG)
47 find_package(zstd CONFIG QUIET)
48 # Only use if 1.4.5 or greater
49 if(zstd_CONFIG AND
50 NOT TARGET zstd::libzstd_static AND
51 NOT TARGET zstd::libzstd_shared)
52 unset(zstd_CONFIG)
53 endif()
54 endif()
55endif()
57if(_zstd_FOUND)
58 set(Zstd_FOUND TRUE)
59 set(ZSTD_FOUND TRUE)
60 set(ZSTD_VERSION ${_zstd_VERSION})
61 if(ZSTD_USE_STATIC_LIBS)
62 set(_zstd_CFLAGS "${_zstd_STATIC_CFLAGS}")
63 set(_zstd_INCLUDE_DIRS "${_zstd_STATIC_INCLUDE_DIRS}")
64 set(_zstd_LIBRARY_DIRS "${_zstd_STATIC_LIBRARY_DIRS}")
65 set(_zstd_LIBRARIES "${_zstd_STATIC_LIBRARIES}")
66 endif()
67 message(STATUS "Found Zstd (via pkg-config): ${_zstd_INCLUDE_DIRS} (found version \"${ZSTD_VERSION}\")")
68elseif(zstd_CONFIG)
69 set(Zstd_FOUND TRUE)
70 set(ZSTD_FOUND TRUE)
71 set(ZSTD_VERSION ${zstd_VERSION})
72 if(ZSTD_USE_STATIC_LIBS)
73 set(_zstd_LIBRARIES zstd::libzstd_static)
74 elseif(TARGET zstd::libzstd)
75 set(_zstd_LIBRARIES zstd::libzstd) # 1.5.6+
76 else()
77 set(_zstd_LIBRARIES zstd::libzstd_shared)
78 endif()
79 message(STATUS "Found Zstd (via CMake Config): ${zstd_CONFIG} (found version \"${ZSTD_VERSION}\")")
80else()
81 find_path(ZSTD_INCLUDE_DIR NAMES "zstd.h")
82 if(ZSTD_USE_STATIC_LIBS)
83 find_library(ZSTD_LIBRARY NAMES "zstd_static" "zstd")
84 else()
85 find_library(ZSTD_LIBRARY NAMES "zstd")
86 endif()
88 unset(ZSTD_VERSION CACHE)
89 if(ZSTD_INCLUDE_DIR AND EXISTS "${ZSTD_INCLUDE_DIR}/zstd.h")
90 set(_version_regex1 "#[\t ]*define[ \t]+ZSTD_VERSION_MAJOR[ \t]+([0-9]+).*")
91 set(_version_regex2 "#[\t ]*define[ \t]+ZSTD_VERSION_MINOR[ \t]+([0-9]+).*")
92 set(_version_regex3 "#[\t ]*define[ \t]+ZSTD_VERSION_RELEASE[ \t]+([0-9]+).*")
93 file(STRINGS "${ZSTD_INCLUDE_DIR}/zstd.h" _version_str1 REGEX "${_version_regex1}")
94 file(STRINGS "${ZSTD_INCLUDE_DIR}/zstd.h" _version_str2 REGEX "${_version_regex2}")
95 file(STRINGS "${ZSTD_INCLUDE_DIR}/zstd.h" _version_str3 REGEX "${_version_regex3}")
96 string(REGEX REPLACE "${_version_regex1}" "\\1" _version_str1 "${_version_str1}")
97 string(REGEX REPLACE "${_version_regex2}" "\\1" _version_str2 "${_version_str2}")
98 string(REGEX REPLACE "${_version_regex3}" "\\1" _version_str3 "${_version_str3}")
99 set(ZSTD_VERSION "${_version_str1}.${_version_str2}.${_version_str3}")
100 unset(_version_regex1)
101 unset(_version_regex2)
102 unset(_version_regex3)
103 unset(_version_str1)
104 unset(_version_str2)
105 unset(_version_str3)
106 endif()
108 include(FindPackageHandleStandardArgs)
109 find_package_handle_standard_args(Zstd
110 REQUIRED_VARS
111 ZSTD_INCLUDE_DIR
112 ZSTD_LIBRARY
113 VERSION_VAR
114 ZSTD_VERSION
115 )
117 if(ZSTD_FOUND)
118 set(_zstd_INCLUDE_DIRS ${ZSTD_INCLUDE_DIR})
119 set(_zstd_LIBRARIES ${ZSTD_LIBRARY})
120 endif()
122 mark_as_advanced(ZSTD_INCLUDE_DIR ZSTD_LIBRARY)
123endif()
125if(ZSTD_FOUND)
126 if(NOT TARGET CURL::zstd)
127 add_library(CURL::zstd INTERFACE IMPORTED)
128 set_target_properties(CURL::zstd PROPERTIES
129 INTERFACE_LIBCURL_PC_MODULES "${_zstd_pc_requires}"
130 INTERFACE_COMPILE_OPTIONS "${_zstd_CFLAGS}"
131 INTERFACE_INCLUDE_DIRECTORIES "${_zstd_INCLUDE_DIRS}"
132 INTERFACE_LINK_DIRECTORIES "${_zstd_LIBRARY_DIRS}"
133 INTERFACE_LINK_LIBRARIES "${_zstd_LIBRARIES}")
134 endif()
135endif()
Diagnostics4 git calls · 29 ms
CallStatusSizeTime029 ms
discover200152 B3 ms
git.upload-pack discover
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=1
git.response.bytes=152
git.server.agent=gitty/1.0
git.server.object_format=sha1
git.server.caps=agent ls-refs fetch object-format
git.server.fetch=shallow filter sideband-all
git.protocol.version=2
git.pkt.frames=8
git.pkt.data=6
git.pkt.flush=2
git.pkt.delim=0
git.pkt.bytes=152
git.pkt.payload.max=34
ls-refs200149 B · hit2 ms
git.upload-pack ls-refs
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=2
git.response.bytes=149
git.response.cache=HIT
git.response.duration_ms=2
git.protocol.version=2
git.pkt.frames=3
git.pkt.data=2
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=149
git.pkt.payload.max=78
git.ls_refs.count=2
git.ls_refs.head=refs/heads/master
fetchblob:none · deepen 10200287 KiB · hit3 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=23
git.response.bytes=293470
git.response.cache=HIT
git.response.duration_ms=3
git.fetch.filter=blob:none
git.fetch.filter.requested=tree:0
git.fetch.filter.fallback=blob:none
git.fetch.filter.learned=false
git.fetch.wants=31c911efe5652725e930f4d2e60c9060e5f6646d
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=10
git.pkt.data=8
git.pkt.flush=1
git.pkt.delim=1
git.pkt.bytes=293470
git.pkt.payload.max=65516
git.sideband.band1.bytes=293354
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=87
git.pack.bytes=293354
git.pack.ofs_delta=0
git.pack.ref_delta=1
git.pack.chain.max=1
git.pack.trailer=6a646bcda6740bab42e321b51998b52ea15146c0
git.pack.full=86
Open pack map
fetch2001.7 KiB · hit23 ms
git.upload-pack fetch
http.response.status_code=200
git.response.bytes=1746
git.response.cache=HIT
git.response.duration_ms=23
git.fetch.wants=81ecd746d94b605edcbd4b2620891d5f5bcd7355
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=3
git.pkt.data=2
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=1746
git.pkt.payload.max=1725
git.sideband.band1.bytes=1724
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://5ad2236b39de4c8bd8f6270ea63f3ea9.artifacts.cloudflare.net/git/public-v0/curl.git
Ref
refs/heads/master
Commit
31c911efe5652725e930f4d2e60c9060e5f6646d
cf-ray
a5e2bedb2d4789da
Request
1c99314e…
Protocol
v2 · sha1
Agent
gitty/1.0
Filter
advertised
Fetch
shallow filter sideband-all
Capabilities
agent ls-refs fetch object-format