While building boomerang, we developed many interesting methods to measure network performance characteristics using JavaScript running in the browser. While the W3C's NavigationTiming API provides access to many performance metrics, there's far more you can get at with some creative tweaking and analysis of how the browser reacts to certain requests.
In this talk, I'll go into the details of how boomerang works to measure network throughput, latency, TCP connect time, DNS time and IPv6 connectivity. I'll also touch upon some of the other performance related browser APIs we use to gather useful information. I will NOT be covering the W3C Navigation Timing API since that's been covered by Alois Reitbauer in a previous Boston Web Perf talk.
Boosting command line experience with python and awkKirill Pavlov
It is often required to manipulate the data as fast as possible, be it either column average calculation or simple join and filtering.
Servers often do not have convenient tools, such as Python (NumPy/Pandas) of R, moreover, the data might not fit into memory.
This talk shows how to make fast but inconvenient command line tools great again.
Boosting command line experience with python and awkKirill Pavlov
It is often required to manipulate the data as fast as possible, be it either column average calculation or simple join and filtering.
Servers often do not have convenient tools, such as Python (NumPy/Pandas) of R, moreover, the data might not fit into memory.
This talk shows how to make fast but inconvenient command line tools great again.
DVC: O'Reilly Artificial Intelligence Conference 2019 - New YorkDmitry Petrov
ML model and dataset versioning is an essential first step in the direction of establishing a good process. Speaker explores open source tools for ML models and datasets versioning, from traditional Git and Git-LFS tools to the ML project-specific tool Data Version Control or DVC.org
Growing number of wireless devices nowadays often results in congestion of wireless channels. In research, this topic is referred to as networking in dense wireless spaces. The literature on the topic shows that the biggest problem is the high number of concurrent sessions to a wireless access point. The obvious solution is to reduce the number of concurrent sessions. This paper proposes a simple method called Bulk-n-Pick which minimizes the number of prolonged concurrent sessions by separating bulk from sync traffic. Aiming at educational applications, under the proposed design web applications would distribute the main bulk of content once at the beginning of a class and then rely on small messages for realtime sync traffic during the class. For realistic performance analysis, this paper first performs real-life experiments with various counts of wireless devices, bulk sizes and levels of sync intensity. Based on the experiment, this paper shows that the proposed Bulk-n-Pick method outperforms the traditional design even when only two concurrent bulk sessions are allowed. The experiment shows that up to 10 concurrent bulk sessions are feasible in practice.
Abusing JavaScript to measure Web Performance, or, "how does boomerang work?"Philip Tellis
While building boomerang, we developed many interesting methods to measure network performance characteristics using JavaScript running in the browser. While the W3C's NavigationTiming API provides access to many performance metrics, there's far more you can get at with some creative tweaking and analysis of how the browser reacts to certain requests.
In this talk, I'll go into the details of how boomerang works to measure network throughput, latency, TCP connect time, DNS time and IPv6 connectivity. I'll also touch upon some of the other performance related browser APIs we use to gather useful information.
http://www.nywebperformance.org/events/78566362/
GDD Japan 2009 - Designing OpenSocial Apps For Speed and ScalePatrick Chanezon
Google Developer Days Japan 2009 - Designing OpenSocial Apps For Speed and Scale
Original slides from Arne Roomann-Kurrik & Chris Chabot with a few Zen quotes and references added by me:-)
From the Venetian Hotel in Las Vegas, Ray Ozzie, Chief Software Architect, will be joined by Corporate Vice President, Scott Guthrie and General Manager, Dean Hachamovitch to demonstrate the latest technologies built for Microsoft's Web platform. Ray will lay out his vision of the future to this audience of Web designers and developers from around the world
AB Testing, Ads and other 3rd party tags - London WebPerf - March 2018Andy Davies
Talk at Smashing Conf - 7th Feb 2018 (Video - https://vimeo.com/254703766)
Explores some of the issues that 3rd-party tags introduce when we add them to our sites, some ways of measuring the impact, and challenges we still have
Practical Performance Tips and Tricks to Make Your HTML/JavaScript Apps FasterDoris Chen
How to tackle real-world web platform performance problems in modern websites and apps? This session starts with a basic understanding of the web platform and then explores to a set of problem/solution pairs built from industry-standard performance guidance. In the talk, we will demonstrate performance tips and tricks that will help you improve the performance of your apps and sites today. We will discuss the following respond to network requests, speed and responsiveness, optimizing media usage, and writing fast JavaScript. These performance tips and tricks apply equally to web sites that run on standards based web browsers, as well as to modern apps.
Slides from Orbitz's use case for microservices on docker & mesos at Velocity Santa Clara 2015 conference.
Details: http://velocityconf.com/web-mobile-business-conf-2015/public/schedule/detail/40700
DVC: O'Reilly Artificial Intelligence Conference 2019 - New YorkDmitry Petrov
ML model and dataset versioning is an essential first step in the direction of establishing a good process. Speaker explores open source tools for ML models and datasets versioning, from traditional Git and Git-LFS tools to the ML project-specific tool Data Version Control or DVC.org
Growing number of wireless devices nowadays often results in congestion of wireless channels. In research, this topic is referred to as networking in dense wireless spaces. The literature on the topic shows that the biggest problem is the high number of concurrent sessions to a wireless access point. The obvious solution is to reduce the number of concurrent sessions. This paper proposes a simple method called Bulk-n-Pick which minimizes the number of prolonged concurrent sessions by separating bulk from sync traffic. Aiming at educational applications, under the proposed design web applications would distribute the main bulk of content once at the beginning of a class and then rely on small messages for realtime sync traffic during the class. For realistic performance analysis, this paper first performs real-life experiments with various counts of wireless devices, bulk sizes and levels of sync intensity. Based on the experiment, this paper shows that the proposed Bulk-n-Pick method outperforms the traditional design even when only two concurrent bulk sessions are allowed. The experiment shows that up to 10 concurrent bulk sessions are feasible in practice.
Abusing JavaScript to measure Web Performance, or, "how does boomerang work?"Philip Tellis
While building boomerang, we developed many interesting methods to measure network performance characteristics using JavaScript running in the browser. While the W3C's NavigationTiming API provides access to many performance metrics, there's far more you can get at with some creative tweaking and analysis of how the browser reacts to certain requests.
In this talk, I'll go into the details of how boomerang works to measure network throughput, latency, TCP connect time, DNS time and IPv6 connectivity. I'll also touch upon some of the other performance related browser APIs we use to gather useful information.
http://www.nywebperformance.org/events/78566362/
GDD Japan 2009 - Designing OpenSocial Apps For Speed and ScalePatrick Chanezon
Google Developer Days Japan 2009 - Designing OpenSocial Apps For Speed and Scale
Original slides from Arne Roomann-Kurrik & Chris Chabot with a few Zen quotes and references added by me:-)
From the Venetian Hotel in Las Vegas, Ray Ozzie, Chief Software Architect, will be joined by Corporate Vice President, Scott Guthrie and General Manager, Dean Hachamovitch to demonstrate the latest technologies built for Microsoft's Web platform. Ray will lay out his vision of the future to this audience of Web designers and developers from around the world
AB Testing, Ads and other 3rd party tags - London WebPerf - March 2018Andy Davies
Talk at Smashing Conf - 7th Feb 2018 (Video - https://vimeo.com/254703766)
Explores some of the issues that 3rd-party tags introduce when we add them to our sites, some ways of measuring the impact, and challenges we still have
Practical Performance Tips and Tricks to Make Your HTML/JavaScript Apps FasterDoris Chen
How to tackle real-world web platform performance problems in modern websites and apps? This session starts with a basic understanding of the web platform and then explores to a set of problem/solution pairs built from industry-standard performance guidance. In the talk, we will demonstrate performance tips and tricks that will help you improve the performance of your apps and sites today. We will discuss the following respond to network requests, speed and responsiveness, optimizing media usage, and writing fast JavaScript. These performance tips and tricks apply equally to web sites that run on standards based web browsers, as well as to modern apps.
Slides from Orbitz's use case for microservices on docker & mesos at Velocity Santa Clara 2015 conference.
Details: http://velocityconf.com/web-mobile-business-conf-2015/public/schedule/detail/40700
Monitoring web application response times, a new approachMark Friedman
An approach to capturing and integrating web client Real User Measurements from the Navigation object with server-side network and HttpServer diagnostic events.
Why is this ASP.NET web app running slowly?Mark Friedman
This presentation attempts to make assumptions used in popular web performance tools like YSlow and webpagetest explicit. It also looks at the NavTiming API and explores ways to capture RUM measurements and correlate them with server-side metrics.
Frontend Performance: Beginner to Expert to Crazy PersonPhilip Tellis
There’s no such thing as fast enough. You can always make your website faster. This talk will show you how. The very first requirement of a great user experience is actually getting the bytes of that experience to the user before they they get tired and leave.In this talk we’ll start with the basics and get progressively insane. We’ll go over several frontend performance best practices, a few anti-patterns, the reasoning behind the rules, and how they’ve changed over the years. We’ll also look at some great tools to help you.
Frontend Performance: De débutant à Expert à Fou FurieuxPhilip Tellis
Frontend Performance Beginner to Expert to Crazy Person
The very first requirement of a great user experience is actually getting the bytes of that experience to the user before they they get tired and leave.
In this talk we'll start with the basics and get progressively insane. We'll go over several frontend performance best practices, a few anti-patterns, the reasoning behind the rules, and how they've changed over the years. We'll also look at some great tools to help you.
La performance front-end de débutant, à expert, à fou furieux !
La toute première condition nécessaire à une bonne expérience utilisateur est de pouvoir obtenir les octets de cette expérience avant que l'utilisateur ne se lasse et parte.
Nous débuterons cette conférence avec les bases pour progressivement devenir démentiel. Nous aborderons plusieurs des meilleurs pratiques de la performance front-end, quelques anti-patterns à éviter, le raisonnement derrière les règles, et comment ces dernières ont changé au fil des ans. Nous regarderons d'un peu plus près quelques très bon outils qui peuvent vous aider.
RUM isn’t just for page level metrics anymore. Thanks to modern browser updates and new techniques we can collect real user data at the object level, finding slow page components and keeping third parties honest.
In this talk we will show you how to use Resource Timing, User Timing, and other browser tricks to time the most important components in your page. We’ll also share recipes for several of the web’s most popular third parties. This will give you a head start on measuring object level performance on your own site.
Frontend Performance: Beginner to Expert to Crazy PersonPhilip Tellis
Boston Web Performance Meetup, April 22, 2014
The very first requirement of a great user experience is actually getting the bytes of that experience to the user before they they get fed up and leave. In this talk we'll start with the basics and get progressively insane. We'll go over several front-end performance best practices, a few anti-patterns, the reasoning behind the rules, and how they've changed over the years. We'll also look at some great tools to help you.
Schedule: 6:30, pizza
7:15: talk
Frontend Performance: Beginner to Expert to Crazy PersonPhilip Tellis
The very first requirement of a great user experience is actually getting the bytes of that experience to the user before they they get fed up and leave.
In this talk we'll start with the basics and get progressively insane. We'll go over several frontend performance best practices, a few anti-patterns, the reasoning behind the rules, and how they've changed over the years. We'll also look at some great tools to help you.
When we built boomerang at Yahoo!, we planned on it being a generic beaconing system with different payloads attached by plugins. We published an API, and wrote plugins to measure page roundtrip time, network throughput and latency. We received other plugins from Yahoo! to measure IPv6 and DNS latency, and then nothing happened...
Until one day, a certain Mr. Brewer submitted a NavTiming plugin. As it turns out, people were using boomerang in-house, and creating their own plugins that were never published.
In this talk, we’ll go over the basics of writing a boomerang plugin to measure anything you need, some best practices involved with writing plugins, and examples of third party plugins that others have written.
The Statistics of Web Performance AnalysisPhilip Tellis
If you're interested in measuring real user web performance, you'll find tools like boomerang or episodes quite handy. Some popular web frameworks even have modules that make it easy to add them to your site. However, what does one do once one has collected the data? How do you filter out the noise and get meaningful insights from the data?
In this talk, I'll go over the techniques we've picked up by analyzing millions of datapoints daily. I'll cover some simple rules to filter out invalid data, and the statistics to analyze and make sense of what's left. Do you use the mean, median or mode? What about the geometric mean and standard deviation? How confident are we in the results? And finally, why should we care?
This talk should help you gain useful insights from a histogram, or at the very least point you in the right direction for further analysis.
Real user monitoring is one of the best ways of learning “the truth” about what visitors experience on your web site, but it comes at a cost. The real world is messy and noisy making it hard to know exactly what’s going on. Filtering your data, splitting it along multiple dimensions, and determining what to discard are important second steps on the path to insightful RUM analysis, and in this session, we’ll go into some of the details.
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!SOFTTECHHUB
As the digital landscape continually evolves, operating systems play a critical role in shaping user experiences and productivity. The launch of Nitrux Linux 3.5.0 marks a significant milestone, offering a robust alternative to traditional systems such as Windows 11. This article delves into the essence of Nitrux Linux 3.5.0, exploring its unique features, advantages, and how it stands as a compelling choice for both casual users and tech enthusiasts.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
In the rapidly evolving landscape of technologies, XML continues to play a vital role in structuring, storing, and transporting data across diverse systems. The recent advancements in artificial intelligence (AI) present new methodologies for enhancing XML development workflows, introducing efficiency, automation, and intelligent capabilities. This presentation will outline the scope and perspective of utilizing AI in XML development. The potential benefits and the possible pitfalls will be highlighted, providing a balanced view of the subject.
We will explore the capabilities of AI in understanding XML markup languages and autonomously creating structured XML content. Additionally, we will examine the capacity of AI to enrich plain text with appropriate XML markup. Practical examples and methodological guidelines will be provided to elucidate how AI can be effectively prompted to interpret and generate accurate XML markup.
Further emphasis will be placed on the role of AI in developing XSLT, or schemas such as XSD and Schematron. We will address the techniques and strategies adopted to create prompts for generating code, explaining code, or refactoring the code, and the results achieved.
The discussion will extend to how AI can be used to transform XML content. In particular, the focus will be on the use of AI XPath extension functions in XSLT, Schematron, Schematron Quick Fixes, or for XML content refactoring.
The presentation aims to deliver a comprehensive overview of AI usage in XML development, providing attendees with the necessary knowledge to make informed decisions. Whether you’re at the early stages of adopting AI or considering integrating it in advanced XML development, this presentation will cover all levels of expertise.
By highlighting the potential advantages and challenges of integrating AI with XML development tools and languages, the presentation seeks to inspire thoughtful conversation around the future of XML development. We’ll not only delve into the technical aspects of AI-powered XML development but also discuss practical implications and possible future directions.
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
How to Get CNIC Information System with Paksim Ga.pptxdanishmna97
Pakdata Cf is a groundbreaking system designed to streamline and facilitate access to CNIC information. This innovative platform leverages advanced technology to provide users with efficient and secure access to their CNIC details.
UiPath Test Automation using UiPath Test Suite series, part 5DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 5. In this session, we will cover CI/CD with devops.
Topics covered:
CI/CD with in UiPath
End-to-end overview of CI/CD pipeline with Azure devops
Speaker:
Lyndsey Byblow, Test Suite Sales Engineer @ UiPath, Inc.
Communications Mining Series - Zero to Hero - Session 1DianaGray10
This session provides introduction to UiPath Communication Mining, importance and platform overview. You will acquire a good understand of the phases in Communication Mining as we go over the platform with you. Topics covered:
• Communication Mining Overview
• Why is it important?
• How can it help today’s business and the benefits
• Phases in Communication Mining
• Demo on Platform overview
• Q/A
GridMate - End to end testing is a critical piece to ensure quality and avoid...ThomasParaiso2
End to end testing is a critical piece to ensure quality and avoid regressions. In this session, we share our journey building an E2E testing pipeline for GridMate components (LWC and Aura) using Cypress, JSForce, FakerJS…
In his public lecture, Christian Timmerer provides insights into the fascinating history of video streaming, starting from its humble beginnings before YouTube to the groundbreaking technologies that now dominate platforms like Netflix and ORF ON. Timmerer also presents provocative contributions of his own that have significantly influenced the industry. He concludes by looking at future challenges and invites the audience to join in a discussion.
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
Threats to mobile devices are more prevalent and increasing in scope and complexity. Users of mobile devices desire to take full advantage of the features
available on those devices, but many of the features provide convenience and capability but sacrifice security. This best practices guide outlines steps the users can take to better protect personal devices and information.
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofsAlex Pruden
This paper presents Reef, a system for generating publicly verifiable succinct non-interactive zero-knowledge proofs that a committed document matches or does not match a regular expression. We describe applications such as proving the strength of passwords, the provenance of email despite redactions, the validity of oblivious DNS queries, and the existence of mutations in DNA. Reef supports the Perl Compatible Regular Expression syntax, including wildcards, alternation, ranges, capture groups, Kleene star, negations, and lookarounds. Reef introduces a new type of automata, Skipping Alternating Finite Automata (SAFA), that skips irrelevant parts of a document when producing proofs without undermining soundness, and instantiates SAFA with a lookup argument. Our experimental evaluation confirms that Reef can generate proofs for documents with 32M characters; the proofs are small and cheap to verify (under a second).
Paper: https://eprint.iacr.org/2023/1886
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
Unlocking Productivity: Leveraging the Potential of Copilot in Microsoft 365, a presentation by Christoforos Vlachos, Senior Solutions Manager – Modern Workplace, Uni Systems
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
Essentials of Automations: The Art of Triggers and Actions in FME
Abusing JavaScript to Measure Web Performance
1. • Philip Tellis
• .com
• philip@lognormal.com
• @bluesmoon
• geek paranoid speedfreak
• http://bluesmoon.info/
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 1
2. I <3 JavaScript
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 2
3. So much that I wore Mustache socks to my wedding
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 3
4. I’m also a Web Speedfreak
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 4
5. We measure real user website performance
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 5
6. This talk is (mostly) about how we abuse JavaScript to do it
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 6
7. Abusing JavaScript to Measure Web
Performance
Philip Tellis / philip@lognormal.com
Boston #WebPerf Meetup / 2012-07-24
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 7
8. First, a note about the code
Note that in the code that follows,
+ new Date
is equivalent to
new Date().getTime()
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 8
9. 1
Latency
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 9
10. 1 Blinking Lights
It takes about 16ms for light to get from SF to Boston
(24ms through fibre)
...
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 10
11. 1 Blinking Lights
It takes about 16ms for light to get from SF to Boston
(24ms through fibre)
Though it takes about 100ms to ping... why?
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 10
12. 1 HTTP
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 11
13. So to measure latency, we need to send 1 packet each way, and
time it
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 12
14. 1 Network latency in JavaScript
var ts, rtt, img = new Image;
img.onload=function() { rtt=(+new Date - ts) };
ts = +new Date;
img.src="/1x1.gif";
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 13
15. 1 Notes
• 1x1 gif is 35 bytes
• including HTTP headers, is smaller than a TCP packet
• Fires onload on all browsers
• 0 byte image fires onerror
• which is indistinguishable from network error
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 14
16. 2
TCP handshake
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 15
17. 2 ACK-ACK-ACK
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 16
18. 2 Connection: keep-alive
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 17
19. 2 Network latency & TCP handshake in JavaScript
var t=[], tcp, rtt;
var ld = function() {
t.push(+new Date);
if(t.length > 2) // run 2 times
done();
else {
var img = new Image;
img.onload = ld;
img.src="/1x1.gif?" + Math.random()
+ ’=’ + new Date;
}
};
var done = function() {
rtt=t[2]-t[1];
tcp=t[1]-t[0]-rtt;
};
ld();
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 18
20. Notice that we’ve ignored DNS lookup time here... how would
you measure it?
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 19
21. Network Throughput
3
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 20
22. 3 Measuring Network Throughput
data_length
download_time
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 21
23. Should you fly a 747 or a 737?
• A 747 seats 400+ passengers
• A 737 seats about 150
• Both take about the same time to fly from SFO to BOS
• A 747 takes longer to load and unload
The best selling aircraft to date is the 737
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 22
24. 3 Network Throughput in JavaScript
// Assume global object
// image={ url: ..., size: ... }
var ts, rtt, bw, img = new Image;
img.onload=function() {
rtt=(+new Date - ts);
bw = image.size*1000/rtt; // rtt is in ms
};
ts = +new Date;
img.src=image.url;
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 23
25. 3 Measuring Network Throughput
If it were that simple, I wouldn’t be doing this talk.
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 24
26. 3 TCP Slow Start
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 25
27. 3 Measuring Network Throughput
So to make the best use of bandwidth, we need resources that fit
in a TCP window
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 26
28. 3 There is no single size that will tax all available networks
http://www.yuiblog.com/blog/2010/04/08/analyzing-bandwidth-and-latency/
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 27
29. 3 Network Throughput in JavaScript – Take 2
// image object is now an array of multiple images
var i=0;
var ld = function() {
if(i>0)
image[i-1].end = +new Date;
if(i >= image.length)
done();
else {
var img = new Image;
img.onload = ld;
image[i].start = +new Date;
img.src=image[i].url;
}
i++;
};
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 28
30. 3 Measuring Network Throughput
Slow network connection, meet really huge image
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 29
31. 3 Network Throughput in JavaScript – Take 3
var img = new Image;
img.onload = ld;
image[i].start = +new Date;
image[i].timer =
setTimeout(function() {
image[i].expired=true
},
image[i].timeout);
img.src=image[i].url;
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 30
32. 3 Network Throughput in JavaScript – Take 3
if(i>0) {
image[i-1].end = +new Date;
clearTimeout(image[i-1].timer);
}
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 31
33. 3 Network Throughput in JavaScript – Take 3
if(i >= image.length
|| (i > 0 && image[i-1].expired)) {
done();
}
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 32
34. 3 Measuring Network Throughput
Are we done yet?
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 33
35. 3 Measuring Network Throughput
Are we done yet?
sure...
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 33
36. 3 Measuring Network Throughput
Except network throughput is different every time you test it
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 34
37. Statistics to the Rescue
flickr/sophistechate/4264466015/
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 35
38. 3 Measuring Network Throughput
The code for that is NOT gonna fit on a slide
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 36
39. But this is sort of what we see world-wide
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 37
40. And it’s different for different countries
This is India
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 38
41. 4 DNS
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 39
42. 4 Measuring DNS
time_with_dns − time_without_dns
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 40
43. 4 Measuring DNS in JavaScript
var t=[], dns, ip, hosts=[’http://hostname.com/’,
’http://ip.ad.dr.ess/’];
var ld = function() {
t.push(+new Date);
if(t.length > hosts.length)
done();
else {
var img = new Image;
img.onload = ld;
img.src=hosts[t.length-1] + "/1x1.gif";
}
};
var done = function() {
ip=t[2]-t[1];
dns=t[1]-t[0]-ip;
};
ld();
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 41
44. 4 Measuring DNS
• What if the IP changes?
• What if DNS is cached?
• What if you map DNS based on geo location?
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 42
45. 4 Wildcard DNS Entries
*.foo.com → IP address
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 43
46. 4 Measuring DNS in JavaScript – take 2
var base_url="http://*.foo.com/",
timers = {}, gen_url="";
function start() {
var random = Math.random().toString(36),
cache_bust = Math.random(),
img = new Image();
gen_url = base_url.replace(/*/, random);
img.onload = A_loaded;
timers.start = +new Date;
img.src = gen_url + "image-l.gif?t=" + cache_bust;
}
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 44
47. 4 Measuring DNS in JavaScript – take 2
function A_loaded() {
var cache_bust = Math.random(),
img = new Image();
img.onload = B_loaded;
timers.a_loaded = +new Date;
img.src = gen_url + "image-l.gif?t=" + cache_bust;
}
I’ll let you figure out B_loaded
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 45
48. 4 Measuring DNS
Full code in boomerang’s DNS plugin
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 46
49. 5 IPv6
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 47
50. 5 Measuring IPv6 support and latency
1 Try to load image from IPv6 host
• If timeout or error, then no IPv6 support
• If successful, then calculate latency and proceed
2 Try to load image from hostname that resolves only to IPv6
host
• If timeout or error, then DNS server doesn’t support IPv6
• If successful, calculate latency
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 48
51. 5 Measuring IPv6 support and latency
Full code in boomerang’s IPv6 plugin
Note, only run this if you know IPv6 is supported by the client
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 49
52. 6
Other Stuff
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 50
53. 6 Other Stuff We Measure
• NavTiming – navtiming.js
• navigation.connection.type – mobile.js
• window.performance.memory – memory.js
• Number of DOM nodes and byte size of HTML –
memory.js
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 51
54. And we try to do it fast
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 52
55. –
.done()
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 53
56. Code/References
• http://lognormal.github.com/boomerang/doc/
(BSD Licensed)
• www.lognormal.com
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 54
57. • Philip Tellis
• .com
• philip@lognormal.com
• @bluesmoon
• geek paranoid speedfreak
• http://bluesmoon.info/
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 55
58. Thank you
Ask me about a discount code
Boston #WebPerf Meetup / 2012-07-24 Abusing JavaScript to Measure Web Performance 56