Try an SMC (System Management Controller) reset and see if that helps:
• Shut down the Macbook.
• Plug in the power adapter/charger.
• Press these keys simultaneously: Shift-Control-Option-Power; keep them held down for about five seconds.
• Release the keys.
• Power up the Macbook, and before the screen lights up, quickly hold down these keys simultaneously: Command-Option-P-R. Keep them held down until you hear the Macbook chime two more times after the powerup chime. This will reset the parameter RAM and non-volatile RAM, which if scrambled, might also be messing up your power management.
• If this process doesn't help, your Macbook may have a defective battery. Don't accept your local Apple Store's analysis that it's behaving normally--call Apple directly and see if they'll help. If they're reluctant, keep at it--often Apple helps only those who are persistent, and who remind Apple that they need to use their Macbook for work (job or student), etc.
Note though, that Apple's specifications page for this model (MacBook (Retina, 12-inch, Early 2015) - Technical Specifications) says this:
• Up to 9 hours wireless web [note that it says "up to 9 hours", not a guaranteed 10 hours]
And:
"Testing conducted by Apple in February 2015 using preproduction 1.2GHz Intel Core M-based 12-inch MacBook systems (wireless web test and HD movie playback test) as well as preproduction 1.2GHz Intel Core M-based 12-inch MacBook systems and preproduction 1.3GHz Intel Core M-based 12-inch MacBook systems (standby test), all configured with 512GB of flash storage and 8GB of RAM. The wireless web test measures battery life by wirelessly browsing 25 popular websites with display brightness set to 12 clicks from bottom or 75%. The HD movie playback test measures battery life by playing back HD 1080p content with display brightness set to 12 clicks from bottom or 75%....See www.apple.com/batteries for more information."
So, the amount of battery time you'll get while online, will vary depending on the number of web pages you keep open, and how much processor time (and thus battery power) those websites are using. Some web pages have so much stuff on them, with so many little routines running in the background, that each of their website's pages is like running a semi-major application, pulling power from the battery. (I'm looking at YOU, Huffington Post)