@@ -41,9 +41,15 @@ defmodule ComponentsGuideWeb.LatencyStatusLive do
41
41
<%= for response <- @ state . responses || [ ] , response != nil do %>
42
42
< div class = "p-4 text-white bg-black font-mono " >
43
43
< pre class = "bg-transparent " > <%= response . url %> </ pre >
44
- < p >
45
- < span class = "text-green-100 " > <%= response . status %> </ span >
46
- in < data class = "text-lg text-sky-200 " > <%= System . convert_time_unit ( response . timings . duration , :native , :millisecond ) %> ms</ data >
44
+ < div class = "my-1 flex justify-center " >
45
+ < div class = "h-1 bg-yellow-200 " style = { "width: #{ System . convert_time_unit ( response . timings . connected , :native , :millisecond ) } px" } > </ div >
46
+ < div class = "h-1 bg-green-500 " style = { "width: #{ System . convert_time_unit ( response . timings . received_status - response . timings . connected , :native , :millisecond ) } px" } > </ div >
47
+ < div class = "h-1 bg-purple-200 " style = { "width: #{ System . convert_time_unit ( response . timings . duration - response . timings . received_status , :native , :millisecond ) } px" } > </ div >
48
+ </ div >
49
+ < p class = "text-lg " >
50
+ 🤝 < data class = "text-yellow-200 " > <%= System . convert_time_unit ( response . timings . connected , :native , :millisecond ) %> ms</ data >
51
+ | < span class = "py-1 px-1 text-green-100 bg-green-900/50 rounded " > <%= response . status %> </ span > < data class = "text-green-200 " > +<%= System . convert_time_unit ( response . timings . received_status - response . timings . connected , :native , :millisecond ) %> ms</ data >
52
+ | < span class = "py-1 px-1 text-purple-100 bg-purple-900/50 rounded " > <%= Format . humanize_bytes ( byte_size ( response . body ) ) %> </ span > body < data class = "text-purple-200 " > +<%= System . convert_time_unit ( response . timings . duration - response . timings . received_status , :native , :millisecond ) %> ms</ data >
47
53
</ p >
48
54
</ div >
49
55
<% end %>
@@ -67,7 +73,11 @@ defmodule ComponentsGuideWeb.LatencyStatusLive do
67
73
urls = [
68
74
"https://workers.cloudflare.com/cf.json" ,
69
75
"https://api.github.com/rate_limit" ,
70
- "https://unpkg.com/robots.txt"
76
+ "https://unpkg.com/robots.txt" ,
77
+ "https://api.npmjs.org/downloads/point/last-month/react" ,
78
+ "https://cdn.jsdelivr.net/npm/[email protected] /underscore-esm-min.js" ,
79
+ "https://vercel.com/blog" ,
80
+ "https://vercel.com/atom" ,
71
81
]
72
82
73
83
responses =
0 commit comments