CU Boulder – Webcentral Drupal 10 Upkeep and Assist Service Including Efficiency Metrics to Your Behat Check Runs

Including behavioural testing to your challenge can do wonders for catching regressions, and even in case you do not begin out your development writing assessments in true Behavioral Pushed Growth fashion, you will enormously profit from having such a check protection.  Inside my group, we use an exterior service to run Drupal Development Company assessments robotically when pull requests are made to our development department. Drupal Development Service outcomes that come again are immensely useful when trying over a pull request and no code is merged into Drupal Development Company codebase till Drupal Development Company check run is inexperienced. Now we have caught a number of bugs and regressions utilizing this methodology, however we would like so as to add extra check protection to raised catch future regressions.  Extra Suggestions Whereas creating and finessing Drupal Development Company testing stack, we began serious about what different suggestions we might acquire from our assessments runs. In spite of everything, we construct a complete website to check out website creation from our profile after which make requests to a bunch of pages on Drupal Development Company constructed check website. Why not try to get some efficiency metrics from Drupal Development Company check run? You would possibly instantly be involved that including code and database queries to a check run would possibly negatively influence Drupal Development Company check run, however we’ve not seen a rise in Drupal Development Company time of Drupal Development Company check runs or any failing assessments associated to added performance-related code. You may also query turning on Drupal 10 modules that will not be on in manufacturing when you’re making an attempt to check websites as if they’re in manufacturing. That concern is a really professional one, however in my expertise, you will run into one thing it’s important to change for setup on a hosted check runner service. We weren’t involved with both potential problem.   Drupal 10 Helps After we had provide you with Drupal Development Company thought of including efficiency metrics to our check runs and weighed Drupal Development Company potential drawbacks, we wanted to jot down some code to finish our improbable and superior thought. Fortunately in Drupal Development Company world, there’s often a Drupal 10 module for that.  We determined to make use of Drupal Development Company Efficiency Logging and Monitoring Drupal 10 module for our use case. Drupal Development Service Drupal 10 module “gives efficiency statistics logging for a website, akin to web page era occasions, and reminiscence utilization, for every web page load.” That description is strictly what we have been in search of. Contrib for Drupal Development Company win! Drupal 10 Assist Setup When you allow Drupal Development Company Drupal 10 module, you will need to first grant your self Drupal Development Company position to manage Drupal Development Company efficiency logging earlier than you are able to do something. Not having this permission on my developer position threw me for a loop for a few minutes, so do not let it get you too! Drupal Development Service Drupal 10 module’s configuration web page lies beneath Drupal Development Company Growth subsection of Drupal Development Company Admin Configuration menu. You possibly can select from abstract, detailed, and/or question logging in addition to exclude sure paths from logging and set an entry threshold for displaying solely Drupal Development Company most accessed pages in your abstract report. Now we have a check setup the place we alter a couple of settings from how our manufacturing websites are configured. In a testing core Drupal 10 module, we listing Drupal Development Company efficiency Drupal 10 module as a dependency and setup some preliminary efficiency logging variables for Drupal Development Company check run. // Setting efficiency logging variables. variable_set(‘performance_detail’, 1); variable_set(‘performance_nodrush’, 1); variable_set(‘performance_threshold_accesses’, ‘2’); variable_set(‘performance_query’, 1); variable_set(‘performance_summary’, 1); Efficiency Logging…Brought on Efficiency Issues Initially, I assumed I had picked a very good configuration for what we wished to get out of Drupal Development Company report. Drupal Development Service downside was that our check runs have been now not passing on Drupal Development Company function department I had put Drupal Development Company code in. Drupal Development Service assessments have been erroring on reminiscence exhaustion when making an attempt to save lots of nodes or beans.  We began to suppose one thing we added to Drupal Development Company codebase had brought about a regression and that this coding error would possibly eat up all Drupal Development Company reminiscence on our manufacturing servers. For sure, we centered quite a bit on our reminiscence exhaustion error.  I had a face palm second after I realised that Drupal Development Company database question logging was inflicting Drupal Development Company problem. It was even written on Drupal Development Company configuration web page, “Enabling it will incurr some reminiscence overhead as question occasions and Drupal Development Company precise question strings are cached in reminiscence as arrays for every web page, therefore skewing Drupal Development Company general web page reminiscence reported.” However I did not discover Drupal Development Company reminiscence warning whereas initially establishing Drupal Development Company Drupal 10 module. // Setting efficiency logging variables. variable_set(‘performance_detail’, 1); variable_set(‘performance_nodrush’, 1); variable_set(‘performance_threshold_accesses’, ‘2’); // Do not examine for abstract element since not utilizing in report. // variable_set(‘performance_summary’, 1); // Do not add question logging because it provides reminiscence overhead. // variable_set(‘performance_query’, 1); Our variable units on Drupal 10 module set up have been modified to mirror Drupal Development Company code above. Sadly, we needed to axe Drupal Development Company question efficiency because of our reminiscence problem, and we additionally disabled Drupal Development Company efficiency logging abstract since that desk is used to create a show for Drupal Development Company Drupal 10 module UI and we have been creating our personal report and show. Including Drupal Development Company Efficiency Logging to Our Travis CI Check Runs Now that we might see Drupal Development Company Drupal 10 module logged Drupal Development Company stats we wished and what configuration we might use log efficiency and nonetheless permit Drupal Development Company check runs to move. Including Drupal Development Company logging setup to our Travis CI script was pretty simple.   – drush si specific express_profile_configure_form.express_core_version=cu_testing_core We construct our websites utilizing a customized distribution profile, and to change how our website is put in for Drupal Development Company check run, we added a step in Drupal Development Company set up part for selecting which core Drupal 10 module you wish to use for website creation. We allow Drupal Development Company testing core Drupal 10 module to setup some variables only for Drupal Development Company Travis check runs.  // Activate error reporting just for severe errors. // Warnings have been inflicting dumb exceptions in Behat and Drupal Development Company messages do not // intrude with Drupal Development Company assessments. error_reporting(E_ERROR | E_PARSE); One essential factor to notice is that PHP warnings and notices find yourself inflicting Behat check runs to fail on Travis CI exiting with an error, non-zero, code. As a result of we all know we now have lots of warnings and notices, hey no person’s good, we determined to show off reporting and solely allow for Drupal Development Company most severe of PHP errors. Apart from that, we primarily turned off issues like Varnish and Memcache that are onerous and useful resource intensive to check out on Travis. Displaying Drupal Development Company Outcomes at Drupal Development Company Finish of Drupal Development Company Check Run As a substitute of doing a little fancy posting of our check outcomes to an exterior URL, we determined to simply print Drupal Development Company logging after our verbose Behat check run output. # Run Behat assessments. – ./bin/behat –config behat.yml –verbose # Output efficiency logging knowledge. – drush scr profiles/specific/assessments/travis-ci/log-express-performance.php Behat merely installs a website, runs Drupal Development Company check suite, after which we print our logging outcomes out at Drupal Development Company finish of Drupal Development Company Travis check run log. We determined to print out 4 knowledge factors for our show output.  print_r(‘Path Drupal 10 Upkeep and Assist Service ‘ . $path[‘path’] . “n”); print_r(‘Accessed Drupal 10 Upkeep and Assist Service ‘ . $rely . “n”); print_r(‘Reminiscence Consumption Drupal 10 Upkeep and Assist Service ‘ . $memory_average . “MBn”); print_r(‘Load Time Drupal 10 Upkeep and Assist Service ‘ . $load_average . ” Millisecondsn”); We restricted our report back to Drupal Development Company high 15 pages by Drupal Development Company variety of requests. Our high three pages have been Drupal Development Company entrance web page, Drupal Development Company consumer dashboard, and Drupal Development Company “node/add” kind.   That about wraps it up. We do intend so as to add extra knowledge to our report and acquire extra perception into code efficiency by doing reminiscence intensive issues and including Behat assessments solely for efficiency logging points. Visiting Drupal Development Company Options web page and reverting options are a very good instance of efficiency assessments we might add. Additionally, whereas having Drupal Development Company efficiency metrics displayed at Drupal Development Company finish of Drupal Development Company check run report is good, you possibly can’t actually get a fast sense of developments in Drupal Development Company knowledge except you’ll manually add up all Drupal Development Company stories. We use Drupal Development Company ELK stack for displaying different logs, and we plan to POST knowledge again to that occasion for higher development monitoring in Drupal Development Company future. I extremely encourage you to strive getting extra suggestions knowledge out of your automated check runs. Whereas they made influence your check runs and add reminiscence overhead, you possibly can at all times use Drupal Development Company stories for marking common developments over time even when Drupal Development Company outcomes aren’t completely correct.   Developer Weblog Drupal 10 Growth and Assist

This article was republished from its original source.
Call Us: 1(800)730-2416

Pixeldust is a 20-year-old web development agency specializing in Drupal and WordPress and working with clients all over the country. With our best in class capabilities, we work with small businesses and fortune 500 companies alike. Give us a call at 1(800)730-2416 and let’s talk about your project.

FREE Drupal SEO Audit

Test your site below to see which issues need to be fixed. We will fix them and optimize your Drupal site 100% for Google and Bing. (Allow 30-60 seconds to gather data.)

Powered by

CU Boulder – Webcentral Drupal 10 Upkeep and Assist Service Including Efficiency Metrics to Your Behat Check Runs

On-Site Drupal SEO Master Setup

We make sure your site is 100% optimized (and stays that way) for the best SEO results.

With Pixeldust On-site (or On-page) SEO we make changes to your site’s structure and performance to make it easier for search engines to see and understand your site’s content. Search engines use algorithms to rank sites by degrees of relevance. Our on-site optimization ensures your site is configured to provide information in a way that meets Google and Bing standards for optimal indexing.

This service includes:

  • Pathauto install and configuration for SEO-friendly URLs.
  • Meta Tags install and configuration with dynamic tokens for meta titles and descriptions for all content types.
  • Install and fix all issues on the SEO checklist module.
  • Install and configure XML sitemap module and submit sitemaps.
  • Install and configure Google Analytics Module.
  • Install and configure Yoast.
  • Install and configure the Advanced Aggregation module to improve performance by minifying and merging CSS and JS.
  • Install and configure Schema.org Metatag.
  • Configure robots.txt.
  • Google Search Console setup snd configuration.
  • Find & Fix H1 tags.
  • Find and fix duplicate/missing meta descriptions.
  • Find and fix duplicate title tags.
  • Improve title, meta tags, and site descriptions.
  • Optimize images for better search engine optimization. Automate where possible.
  • Find and fix the missing alt and title tag for all images. Automate where possible.
  • The project takes 1 week to complete.